This article describes the methods available to switch the publish environment of an installed Universal Tag (utag.js) file.
In this article:
When you want to test changes on a particular site, but do not have access to the change the installed utag.js file, you can switch from the publish environment to another environment to test your changes. Switching environments 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 Web Companion method provides an interface with buttons that allow you to quickly view one of the default environments on a page.
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.
When you launch the Environment Switcher, the current account and profile detected on the page displays, along with configuration tabs that allow you to adjust the switcher according to your input.
Once you have the Environment Switcher available in Tealium Tools, use the following steps to launch it:
You can also change the environment by placing an environment cookie.
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: