Code Center is where you get the code to add the Universal Tag (utag.js) to your website.

In this article:

Table of Contents Placeholder

Accessing Code Center

  1. Click the user menu in the upper right corner and select Code Center.
  2. In the side panel, select the desired environment.
    iq-code-center.png
  3. Click OK to close the Code Center.

Code Center Settings

The following settings can be adjusted to customize the code snippet displayed.

  • Environment Title
    The environment is one of three default environments (Dev, QA, Prod) or any custom environments that Tealium publishes to. Select one of these environments. Notice how the environment in the utag.js path changes as you select different environments.

    Enter a custom name for one of the default environments. This new name will appear throughout the UI.

  • JavaScript Type
    This determines whether the tags are loaded synchronously or asynchronously. By default Asynchronous load is selected and we recommended it as a best practice as it provides faster page loading and a better visitor experience.

  • Disable Comments
    Checking this box will remove the comments from the code snippet (recommended). 

Use the Code Snippet

Tealium Script

The Tealium Script tab displays the code based on your selections. The code includes the Universal Data Object (a sample of utag_data) and the Universal Tag code (utag.js). The Universal Data Object displayed here is generated from the variables defined in the Data Layer tab. 

The Universal Data Object seen in Code Center is only a placeholder. You must dynamically populate it with real values in order to send data to your tags. 

Use the following steps to copy your code snippet:

  1. Select the code displayed in the text box by either method:
    • Click and drag to select all the code.
    • Click the Select All button that appears when you mouse over the code.
      iq-code-center-select-all.png
  2. Copy the code.
  3. Paste the code into your site authoring tool or back-end system.

Sample HTML

The Sample HTML tab provides an example of what the code would look like when added to a webpage. The sample code appears after the opening <body> tag, in accordance with our best practices.

Custom Publish Environments

Custom publish environments is a feature that must be enabled to use. To learn more, see Custom Publish Environments.