Using tags in utag.sync.js

Gold Contributor
Gold Contributor

Hello,

 

I was wondering if it's possible to have a Tag (as in, a tag in the list of Tags in Tealium IQ, with a UID) inside the utag.sync.js file.

My goal is to be able to disable any code in the utag.sync.js file without having to alter the actual file.

This would make it easier for my colleagues to disable the tag quickly, if something should go wrong with the tag.

 

I've tried using the "synchronous load type" setting on the tags, but I'm afraid this is only used for a synchronized utag.js script.

 

Thanks!

 

Kind Regards,

Sam Van Renterghem

2 REPLIES 2

Using tags in utag.sync.js

Community Manager
Community Manager

@Sam The utag.sync.js file is not tied to the list of tags managed in the UI. There's a simple trick you can use to make the code within utag.sync.js a little easier to manage--wrap each vendor's code in an if() block, like this:

if(1) {
    // Vendor code here
}

You simply change the "1" to "0" to not run the vendor code.

More info: Using utag.sync.js

Remember to "Accept as Solution" when your question has been answered and to give kudos to helpful replies.

Using tags in utag.sync.js

Gold Contributor
Gold Contributor
Thanks for the info and the tip, Justin!
Public