Using first-party domains
This article explains how to use first-party-domains
After your domains are configured and the certificates are validated you can begin using your first-party domains with the following services:
- Tag Management
- Tealium Collect
First-party domains and environment switcher
Environment switcher is a browser plugin that can be used to change the Tealium files (utag.js
and utag.sync.js
) that are loaded on a page, which is useful during testing. Environment switcher does not work properly when first-party domains is used for the tags.tiqcdn.com
domain. In this case, you can setup a URL redirect for tags.tiqcdn.com
in environment switcher.
For more information, see Tealium Tools: Environment Switcher.
Tag management
To use your first-party domain with iQ Tag Management you must also make the following changes:
- Update the Universal Tag (
utag.js
) code snippet wherever it is installed. - Set the publishing URLs.
- Edit the template for
utag.js
to adjust the location ofutag.v.js
.
Update universal tag loading script
To update the Universal Tag code snippet:
- Navigate to User Admin Menu > Code Center.
- Under Choose Domain, select your first-party domain.
The example code snippet is updated to use your first-party domain.
The new URL only uses the profile name and environment in the path. The account name and /utag/
portions are omitted.
The URL to the Universal Tag on a first-party domain is:
https://**sub.your_domain.com**/PROFILE/ENV/utag.js
For example, the code snippet for tags.tealiumecommerce.com
would be:
<!-- Loading script asynchronously -->
<script type="text/javascript">
(function(a,b,c,d){
a='**https://tags.tealiumecommerce.com/ecomm/prod/utag.js**';
b=document;c='script';d=b.createElement(c);d.src=a;d.type='text/java'+c;d.async=true;
a=b.getElementsByTagName(c)[0];a.parentNode.insertBefore(d,a);
})();
</script>
Set publishing URLs
The publishing URLs determine where to load the additional utag.#.js
files for each default environment. If you forget this step, then the vendor tag files loaded after utag.js
will not originate from your domain.
To set the publishing URLs:
- Click Save/Publish, then click Configure Publish Settings….
- Under Publishing URLs, enter a URL for each environment that uses your first-party domain.
Dev://sub.your_domain.com/your_profile/dev/
QA://sub.your_domain.com/your_profile/qa/
Prod://sub.your_domain.com/your_profile/prod/
- Click Save.
After all of these changes, save and publish to apply the changes to your site.
Tealium Collect
To use your first-party domain with Tealium EventStream or Tealium AudienceStream you need to update the data collection URL in your installation of Tealium Collect. For websites, this requires setting the Tealium Collect Endpoint field for the Tealium Collect tag.
To update the Tealium Collect tag:
- Go to iQ Tag Management > Tags and expand the Tealium Collect tag.
- In the Tealium Collect Endpoint field, enter your first-party domain endpoint.
Example:sub.your_domain.com/your_account/your_profile/2/i.gif
- Click Apply.
Collect for mobile
For mobile apps, you must override the dispatch URL in the Collect module.
For more information on setting your first-party domain endpoint, see the following:
- [Tealium for Swift: config.overrideCollectURL]/platforms/ios-swift/api/tealium-config/#overridecollecturl)
- [Tealium for Android: config.overrideCollectUrl]/platforms/android-kotlin/module-list/collect/#configuration-options)
This page was last updated: January 7, 2023