The Tealium Custom Container allows you to call a script on your page that is not normally supported by Tealium. Tealium's code will treat this Custom Container Tag as any other vendor Tag.

Before You Begin

Using this Tag requires you to modify the Tag template and is only recommended for advanced users. You will need the appropriate permissions to modify Tag templates. Please note the following pointers before adding any code to the Custom Container Tag template.

Things to remember:

  • Add JavaScript code only
  • Do not add HTML code
  • Do not include any <script> </script> Tags in your code
  • Uncomment the single-line Javascript comments ("//") before inserting the code in a section.

Configuring the Tealium Custom Container Tag

  1. Navigate to the Tags tab and add the Tealium Custom Container Tag, located under the Misc tab of the Tags marketplace.


  2. In the Title field, enter a descriptive title indicating the Tag you intend to load through the template. 


  3. Navigate to the Load Rules tab and apply any load rules to the Tag as necessary.
  4. Click 'Next' to proceed to the Mapped Variables tab.
  5. Select a Variable from the first drop-down list and click the select_destination_button.png button.
  6. Enter a custom destination in the text field that appears next. The destination variable will then be available within the object of the Custom Container.


  7. To use the Custom Container Tag, we must make changes to the Tag's template. The template will not become available for editing until after you perform a Save or Save As.​ Do so now.

    Note: We have not yet made changes that require us to publish anything, so there is no need to publish.

  8. Once the profile has finished saving, click on your name/email address in the upper right corner of the Tealium iQ console.
  9. The Admin menu will drop down. Click  on 'Manage Templates', located from under 'Account Admin'.


  10. Select 'Tealium Custom Container' from the drop-down list. This will open the Tag template.

    Note: If you're adding more than one Custom Container, the title is very important when it comes time to distinguish them. You can also identify each Tag by its UID number. This number corresponds to the number displayed in the Tags tab.


  11. The template begins with a series of instructions inserted as comments. Read them carefully before you proceed to modify the template.


  12. Insert your custom JavaScript code between the /*Start*/ and /*End*/ comments in the pertinent sections.
    Example: The code for a callback function must be inserted between the comments /* Start Libloader Callback Function */ and /* End Libloader Callback Function */.

    Note: By default, the 'u.ev' JavaScript object allows you to track View events using the code: u.ev = {'view' : 1}
    To track Link events, besides View events, use the following code:
    u.ev = {'view' : 1, 'link' : 1}

  13. Save your changes to the template by clicking the appropriate save button.
    • Save Version Template - Select this option if you wish to save the updated template ONLY for the current version, not for the entire profile. This will supersede the profile's template.
    • Save Profile Template - Select this option if you wish to save the updated template for all versions of the profile. This is the recommended selection.
  14. Perform a Save As and Publish your changes.