- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
07-23-2019 01:17 AM
I have created the following script in an attempt to automatically load the China CDN if the Main CDN fails to load. The idea is to provide a single script that will work globally including users in China from the same page..
<script type="text/javascript"> a='//tags.tiqcdn.com/utag/account-name/profile/prod/utag.js'; b=document;c='script';d=b.createElement(c);d.src=a;d.type='text/java'+c;d.async=true; d.onerror = function() { a='//tags.tiqcdn.cn/utag/account-name/profile/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); } a=b.getElementsByTagName(c)[0]; a.parentNode.insertBefore(d,a); </script>
I am looking for feedback on potential issues anyone could see with the above method not working on browsers or mobiles.
07-23-2019 03:23 PM
08-02-2019 01:51 AM
@mitchellt wrote:
Hi @AndrewFenn - what issues are you experiencing/attempting to solve,
I mentioned it in the original post...
> The idea is to provide a single script that will work globally including users in China from the same page..
Right now users in China will get a DNS error on the .com version of the tag, but not for the .cn version. We have confirmed this. Surprisingly these issues only exist with TealiumIQ. The .com on Tealium Collect seems to work without issue.
Copyright All Rights Reserved © 2008-2023