Skip to main content
All CollectionsMeasurment optionsSite Tracker Tag
Site Tracker Tag - cookie parameters
Site Tracker Tag - cookie parameters
TrafficGuard Support avatar
Written by TrafficGuard Support
Updated over a week ago

The Site Tracker Tag uses cookies to identify users across browsing sessions. This page explains how to customise the cookie settings.

Parameter name

Example value




Used to specify individual sub domains where cross sub domain tracking is not desired.

By default the Site Tracker Tag has automatic cookie domain configuration enabled.

Format: string



Long term cookie expiration time in minutes.

Default value for these cookies is 365 days (8760 hours).

Format: integer


Any string value that fits cookie name.
”_test” → cookie name will be “_test_cookie” instead of _cookie

Used to add a prefix for all cookie names used in js_tag service.

Format: string

To change any of these values, update the tag. For example:

<!-- TrafficGuard Start -->
var dataTrafficGuard = dataTrafficGuard || [];
dataTrafficGuard.push(['property', '{property-id}']);
(function() {
var tg = document.createElement('script'); tg.type = 'text/javascript'; tg.async = true;tg.src = '{property-id}';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tg, s);
<noscript><img src="{property-id}&event_name=pageview&no_script=1" width="1" height="1" border="0"/></noscript>
<!-- TrafficGuard End-->

Cookie domain

By default the Site Tracker Tag has automatic cookie domain configuration enabled.

To turn off automatic cookie domain configuration, update the config for your property to specify a value for the cookie_domain parameter:

Cookie prefix

To avoid conflicts with other cookies, you may need to change the cookie prefix, which will be prepended to cookies set by the Site Tracker Tag.

Cookie expiration

On each page load, the cookie expiration time is updated to be the current time plus the value of the cookie_expires field.

If you set the cookie_expires value to 0 (zero) seconds, the cookie turns into a session-based cookie and expires once the current browser session ends.

Did this answer your question?