Methods to Switch Publish Environment

Methods to Switch Publish Environment

by on ‎05-29-2018 02:24 PM - edited on ‎05-29-2018 02:26 PM by Community Manager (579 Views)

This article is a summary of the different methods available to switch the publish environment of an installed utag.js file. These methods are helpful if you've published changes to Dev or QA and want to test your updates on a site that loads the Prod environment. These methods allow you to override the installed environment so you can test changes from another environment.

In this article:

Table of Contents Placeholder

Web Companion

When you open Web Companion, the pop-up window will identify the environment currently loaded. Here is an example showing the Prod environment loaded:

WC1.png

In Web Companion you can specify the environment to load by clicking the environment, then clicking Refresh Page

To ensure the environment that has loaded matches the one published, view the timestamp on the Versions screen for the latest publish of the environment you've selected:

TiQ1.png

Then reopen Web Companion on your page and compare the timestamps. They should reflect the same, relative, time:

WC2.png

The timezone reported in Tealium iQ uses GMT while the time in Web Companion is displayed in the local time.

The CDN can take up to 5 minutes to update. If you find that the timestamps do not match, wait a while. Then click click to set back to default environment and repeat in Web Companion selecting the environment to test and click Refresh. Allowing some time for the network to update may be all that is needed.

 

Tealium Tool: Environment Switcher

When you open Environment Switcherthe pop-up window will identify the Tealium environment currently loaded. Here is an example showing the prod environment loaded:

ES1.jpeg

In Environment Switcher you can specify the environment to load by clicking the environment, then clicking Start / Restart

Unlike Web Companion, Environment Switcher will not display the version number of the environment loaded.

Environment Cookie

Through your browser's console, use the following command to place a cookie:

document.cookie = "utag_env_ACCOUNT_PROFILE=//tags.tiqcdn.com/utag/ ACCOUNT/PROFILE/ENV/utag.js; path=/; domain=YOURSITE.com";

In the above command line, replace each of the placeholders:

  • ACCOUNT - your Tealium iQ account name
  • PROFILE - your Tealium iQ profile name
  • ENV - the environment to load (dev, qa, or "custom")
  • YOURSITE - the domain of your site

After creating the cookie, refresh your browser to load the specified Tealium environment.

Once the environment is loaded, you can check the version of that environment to ensure it matches the publish performed in Tealium iQ. In the Console, enter the following command and hit Enter:

utag.cfg.v

Here is an example of the results:

EC1.png 

The timezone reported in Tealium iQ is GMT while the timezone is reported locally within Web Companion
The timestamp may be 1 or 2 seconds different. This can occur when multiple environments are published. Only one timestamp is provided for all.