This article describes the methods available to switch the publish environment of the Universal Tag (utag.js) file loaded on your site.
In this article:
When you want to test changes on your site, but do not have access to edit the installed Tealium files, use a method called environment switching to load a different version of the Tealium files (utag.js, utag.sync.js) on your site. Environment switching is a safe way to test changes on your production site without publishing to the Prod environment.
There are three (3) methods that can be used to switch environments:
The Environment Switcher is a Tealium Tool that runs in the Chrome browser and is the recommended method for testing different environment version of utag.js on your site.
Learn more about how to use the Environment Switcher to load different versions of the Tealium files.
Web Companion provides a way to load the Tealium files from any of the standard environments: Dev, QA, or Prod.
This feature is disabled by default. To enable this feature, turn on the Web Companion setting in your publish settings.
Use the following steps to change environments using Web Companion:
The switched environment is only valid for your local session. Your production site is not affected.
You can also change the environment by setting a cookie.
For this method to work, you must turn on the Web Companion setting in your publish settings.
Use the following steps to place an environment cookie:
document.cookie = "utag_env_ACCOUNT_PROFILE=//tags.tiqcdn.com/utag/ACCOUNT/PROFILE/ENV/utag.js; path=/; domain=YOURSITE.com";
In the command line example, replace the variables as follows: