- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
Hi,
In China, we have a problem with Tealium loading too slowly, which makes the site load time too slow. That's why we wanted to use the China CDN and have adapted the code on the Chinese website and also created a new profile for China:
Unfortunately, only the first call is really fired over the China CDN and all further calls are subsequently made via the .com domain.
Unfortunately, the problem persists, so I wanted to ask if there is any possibility for this profile to run everything on the Chinese domain? Can I change the settings for this?
Many thanks in advance for your help,
Sophie
Did you solve it? if yes Could you please share the solution?
I also came across this issue and Tealium adsives us that
"The .cn domain you are leveraging for the main utag.js file is correct; however, you will also need to set up all individual utag.##.js (each individual tag has its own corresponding .js file) with the .cn path as well.
Within TiQ, to update the path for the individual tags, we'll need to hardcode the Publishing URLs within the Publishing Settings to use //tags.tiqcdn.cn/utag/ACCOUNT/PROFILE/ENVIRONMENT/:
If you're loading more than the China website in the TiQ profile, there is a way to override this based on a condition (i.e. domain contains .cn, etc.). If you wanted to use TiQ, you'd use a Pre Loader scoped JS extension with the code snippet below (adjusted to match the desired condition and path).
//The following is a Preloader JS Extension to dynamically set the location of utag.X.js files based on a condition
utag_cfg_ovrd = utag_cfg_ovrd || {};
if (location.hostname.indexOf("my.example.cn") > -1) {
utag_cfg_ovrd.path = "//tags.tiqcdn.cn/utag/ACCOUNT/PROFILE/prod/";
} else {
utag_cfg_ovrd.path = "//tags.tiqcdn.com/utag/ACCOUNT/PROFILE/prod/";
Because this is a preloader extension, we do not have access to which Tealium environment is loading in utag.data, but if you have Staging or Dev URLs, those can be used in an if statement to load the proper environment.
Or your developers would load this directly on the page and skip using the JS Ext within TiQ.
To learn more about utag_cfg_ovrd and how to implement it, please visit the link below:
https://community.tealiumiq.com/t5/JavaScript-utag-js/Config-Overrides-for-utag-js/ta-p/14048
Thank you Chris Horme - Lead Engineer, Solutions Engineering
Copyright All Rights Reserved © 2008-2023