- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
12-13-2016 09:56 AM
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!
12-14-2016 01:58 AM
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
12-14-2016 08:28 AM
@adrian_browning Thank you. Thats helpful
12-14-2016 08:29 AM - last edited on 12-15-2016 08:47 AM by kathleen_jo
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!
12-19-2016 09:59 AM
So let me try and list out and clarify between the 2 posts :)
The options you have initially are:
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:
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.
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
Copyright All Rights Reserved © 2008-2023