This article describes the methods available to switch the publish environment of an installed Universal Tag (utag.js) file. Switching the publish environment is needed when you want to test changes on a particular site, but don't have access to the change the installed utag.js file. This method is often used as a safe way to test changes on your production site without publishing to the Prod environment.
In this article:
Web Companion, provides buttons to quickly view one of the default environments on a page. When you launch Web Companion the Target Environment section represents the current environment in blue and the coded environment with the orange border. On your production site, it would look like this:
To change which environment gets loaded on the page, clicking Dev or QA, then Refresh Page and the page will refresh with the newly selected environment. For example, if you clicked QA, refreshed the page, then reopened Web Companion, you would see this:
The switched environment is only valid for your local session. Your production site is not affected.
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:
To change which environment gets loaded on the page, click the desired environment, then click Start / Restart.
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 new environment.