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:

Table of Contents Placeholder

Web Companion

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.

Tealium Tool: Environment Switcher

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.

Environment Cookie

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

document.cookie = "utag_env_ACCOUNT_PROFILE=// ACCOUNT/PROFILE/ENV/utag.js; path=/;";

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 new environment.

Tags (2)