Highlighted

Is it possible to set tealium wait flag to no for specific tags for specific scenarios

Bronze Contributor
Bronze Contributor

we have pre-loader that sets flag " window.utag_cfg_ovrd.dom_complete = true;" to fire tags dom complete/loadeed .

My questions are

- Is it possible to overwrite above flag for one tag to fire tag on dom ready? if we turn off wait flag off is it going to load dom ready?

- Can we make tag fire dom complete on some pages ,dom ready on some pages?

Ex: If the tag firing on all pages, we want the tag to load dom ready on orderconfirmation , other pages it should load dom complete

Appeciate any help!

4 REPLIES 4

Is it possible to set tealium wait flag to no for specific tags for specific scenarios

Tealium Employee

HI @sailakumari_pay,

So to answer your questions.
1) Is it possible to overwrite above flag for one tag to fire tag on dom ready? if we turn off wait flag off is it going to load dom ready?
    - Simple answer is no. The dom ready flag applies at the global level.

2) Can we make tag fire dom complete on some pages ,dom ready on some pages?

So depending on the number of tags you want to fire in each situation. There is a way that you could achieve this.
1) For tags that you want to fire at page load, keep as they are
2) For tags to load after dom ready, set up a DOM Ready Extension.
    Inside you can call, utag.view({...}); With an additional data value of dom_ready : true. Then on the tags you want to fire after DOM Ready, add the condition dom_ready ==== true to there load rule.

The other way is to use the other syntax of utag.view({...}, null [<list of tag uids>]);

What this will do is only fire the tags listed in the list. 

Hopefully this has given you a starting point. If you need more help, I would suggest maybe reaching out to your Account Manager or raising a ticket for one of the team to help.

https://community.tealiumiq.com/t5/custom/page/page-id/support-contact-form

 Adrian

Ask me anything Tealium related or Javascript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.
Highlighted

Is it possible to set tealium wait flag to no for specific tags for specific scenarios

Bronze Contributor
Bronze Contributor

@adrian_browning Thank you. Thats helpful

 

Highlighted

Is it possible to set tealium wait flag to no for specific tags for specific scenarios

Silver Contributor
Silver Contributor

Hey @adrian_browning,

A little more background, we currently have the global tag set to fire all tags after dom.complete - but are looking for a mechanism to have a specific tag(s) fire earlier.  I'd thought earlier you said that we can use the wait flag (turning it off on the advanced settings of the tag) to achieve this affect - but your response in this thread seems contradictory?  can you clarify?
(original thread: https://community.tealiumiq.com/t5/Tealium-iQ-Tag-Management/Controlling-when-tags-fire-in-pageload-...)

Additionally, if we're able to set up some kind of rule to adjust the timing of the fire so that the same tag fires at different times depending on a value within the datalayer (i.e. fire earlier on order confimration page, but later on other pages) - that would also be desireable.

The Dom Ready Extension you mention: I see a dom ready extension available in the extension listing - do you mean scoping an extension to dom ready?

Last, can you give a link for documentation on how to use the utag.view({...}) command, and also how to create load rule conditions based on dom.ready? (are are other dom load statuses available?).

 

Thanks!

Highlighted

Is it possible to set tealium wait flag to no for specific tags for specific scenarios

Tealium Employee

Hi @Michael_Kim_shc

So let me try and list out and clarify between the 2 posts :)

The options you have initially are:

  1. All Tags Wait
    This forces all tags (even tags that have wait off, will be forced to wait until DOM Complete
  2. Individual tags wait
    You can initially set tags to either wait for the DOM event or fire ASAP.
  3. Bundling - both these options allow for a quicker firing time, 
    1. All tags - Any tag with a "All Pages Load Rule"
    2. Tag specific

utag override flags

 

Some utag config flags that could be useful, and would need to be set in a JS Extension, scoped to preloader are:

  1. utag_cfg_ovrd.readywait [boolean] - this is the Global wait flag
  2. utag_cfg_ovrd.waittimer [number] - this is an additional setting that if the global wait is used, you can change the amount of time before execting the rest of the utag code
  3. utag_cfg_ovrd.dom_complete [boolean] - this changes the detection of when to trigger the tags to fire. By default we will use document.readyState !== "loading" you can set this to true utag_ovrd_cfg.dom_complete = true; and this will change the detection to  document.readyState === "complete"; .

So with regards to the DOM Ready Extension, this would be a JS Extension scoped to DOM Ready.

DOMReady.png

For some links about utag.view:

Hopefully this isn't information overload, but if you need further help, it might be worth raising a ticket for someone to talk to you 1-on-1, and fully describe how you might want to go through with this.

Adrian

Ask me anything Tealium related or Javascript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.