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:
When you open Web Companion, the pop-up window will identify the environment currently loaded. Here is an example showing the Prod environment loaded:
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:
Then reopen Web Companion on your page and compare the timestamps. They should reflect the same, relative, time:
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.
When you open Environment Switcher, the pop-up window will identify the Tealium environment currently loaded. Here is an example showing the prod environment loaded:
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.
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:
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:
Here is an example of the results:
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.