of cookie monster The custom tag template is server container tag template for Google Tag Manager Community template gallery.
explanation
Use the Cookie Monster template to set arbitrary browser cookies in the HTTP responses returned from the Server container.
Each cookie is added as a new row in the table fields. Configurable values are:
- name – The name of the cookie.
- worth – Cookie value.
- date of expiry – Cookie expiry time (in seconds).
- domain – The domain to write cookies to.
instructions
can be hardcoded worth as needed or new cookie value variable. for example, _fbc
To use cookies in HTTP requests, you can use variables like:
If you want the cookie to be set only if the HTTP request has a valid value, you should configure this in your tag trigger. The Cookie Monster tag writes the cookie whether or not it gets a valid value.
You can also configure expiration dates and domains.If set domain To auto
, attempts to write the cookie at the highest possible level in the domain name hierarchy.For example, if the GTM server is running sgtm.simoahava.com
,setting domain To auto
Make the tag write the cookie simoahava.com
.
Release notes
date | change set |
---|---|
May 10, 2021 | Added HttpOnly option. |
April 26, 2021 | Initial release. |