Settings

Learn about the available settings that adjust the behavior of utag.js.

How It Works

Many of the behaviors of utag.js are controlled with settings set in the utag.cfg object. The default behaviors controlled by these settings can be overridden using a new object called utag_cfg_ovrd. This object can be set in your page code prior to loading utag.js or within a JavaScript Code Extension scoped to Pre Loader. The override object should be scoped to the window object and initialized safely with the following convention:

window.utag_cfg_ovrd =window.utag_cfg_ovrd || {};

Settings

consentPeriod

Consent Manager retention period

Overrides the default 90 days with a custom number of days.

Parameter Name: consentPeriod

Default Value: (not set, but equivalent to 90)

window.utag_cfg_ovrd.consentPeriod =60;

dom_complete

Delay Tags Until DOM Complete (load) Event

Fires tags at the document load event rather than at DOM Ready. This will also hold back any extensions scoped to DOM Ready.

Parameter Name: dom_complete

Default Value: false

window.utag_cfg_ovrd.dom_complete =true;

domain

Override Cookie Domain

Sets the domain where ‘utag_main’ cookie is set. Useful for sites on root domains that won’t accept cookies (e.g. amazonaws.com).

Parameter Name: domain

Default Value: The top-level domain of location.hostname

window.utag_cfg_ovrd.domain ="mysite.amazonaws.com";

load_rules_ajax

Disable Load Rules After Page Load (legacy)

Controls if Load Rules will be reprocessed on each call to utag.view and utag.link within the same page load. A newly triggered Load Rule could load a new tag into the page. Use this setting to replicate behavior from versions of utag.js older than 4.2x.

Parameter Name: load_rules_ajax

Default Value: true

window.utag_cfg_ovrd.load_rules_ajax =false;

load_rules_at_wait

Run Load Rules After Extensions (legacy)

Evaluates Load Rules after extensions. Used for older versions of utag.js and for installations where the data layer object is populated after loading utag.js. Newer versions of utag.js can make use of extension execution order instead of this setting.

noload

Disable utag.js

Suppresses the loading of all tags. The execution of utag.js will halt after Pre Loader extensions. Extensions scoped to DOM Ready will still run. This is normally adjusted using the Publish Configuration setting for Prevent Tag Load.

Configuration Parameter: noload

Default value: 0

window.utag_cfg_ovrd.noload =true;

noview

Disable Initial Tracking (Single Page Applications)

Suppresses the automatic page tracking event called by utag.js. Commonly used on single page application sites.

Parameter Name: noview

Default Value: false

window.utag_cfg_ovrd.noview =true;

nocookie

Cookie Opt-Out

Only set this option if/when a user visiting your site has explicitly opted out of all cookies.

Using this option inflates visitor and session counts, making all visits look like “single page sessions”.

This option will disable all cookies from being stored by utag.js, including cookies set with the Persist Data Value Extension, and visitor/session cookies. It also sets a new timestamp for the variables ut.visitor_id, tealium_visitor_id, and cp.utag_main_v_id when the cookie is not available.

Parameter Name: nocookie

Default Value: false

window.utag.cfg.ovrd.nocookie=true

readywait

Delay utag.js Until DOM Ready

Halt all utag.js operations until the DOM-Ready signal is received from the browser. Extensions scoped to Pre Loader still run when utag.js loads.

Parameter Name: readywait

Default Value: 0

window.utag_cfg_ovrd.readywait =true;

session_timeout

Session Timeout

Sets how long to wait, in milliseconds, before expiring the current session. This is normally adjusted using the Publish Configuration setting for Session Timeout.