It's not clear to me how Dynamic Tag Manager (DTM) executes the Adobe Analytics Page Load rules and specifically when does it fire the Adobe Analytics request (s.t function).
Adobe provides this diagram (https://marketing.adobe.com/resources/help/en_US/dtm/graphics/DTMLoadOrder.png) but to me it seems it lacks some important detail.
Now here are my questions:
Thank you all
_satellite.pageBottom
and put that call in some callback function, DTM code is written to as a last measure pop it on dom ready if it has not already been invoked. The only way to get around this is to NOT use DTM's built in Adobe Analytics integration, and instead treat it as random 3rd party script (load whole thing including the library in a page load rule in the Javascript section. Actually, you'd prolly want to do it in a direct call rule instead of page rule in that case).
Update: Question asked below
Thanks! So my assumption that that the s.t function waits for the page load rules to load was wrong.
Well, yes and no. If you set Adobe Analytics to trigger at "bottom of page", and you set your page load rule to trigger at "top of page", then in many use-cases, this is fine. But in your case of needing to set it on dom ready, the page load rule won't work by itself.
One thing I forgot to mention to you is that you can suppress an Adobe Analytics request with s.abort
. Long story short is you can use s.abort
to suppress the initial s.t
call and then call it at your own leisure. But there are caveats about it, namely
s_doPlugins
)_trackPageview
(or UA equiv) call, and AFAIK GA has no s.abort
equiv. IOW this is tool-specific, not rule-specific. Then I don't understand what is the use case for the page load rules? We need to set vars based on data-layer (needs onDomReady) and include them in the initial request triggered by s.t funtion. Do we need to do all of this in the s_code then?
Well, keep in mind that DTM is a general tag manager, not an Adobe Analytics specific tag manager, so there are plenty of use-cases for page load rules if everything is done through the rules, which is what you'd do for random scripts that aren't integrated into DTM (where you can add as a tool).
Also keep in mind that Adobe didn't build DTM; they bought it from a 3rd party and have since been working to integrate their products into it. I expect (hopefully) over time they will add better functionality to cater to scenarios like yours. When Adobe first started pushing DTM, it was a mess, and I avoided recommending it to clients. It's come a long way since then and now I will at least say okay sure, it's usable enough to consider using, esp since it's basically free (with Adobe Marketing subscription). But point is, they are progressing it, even if DTM is still miles behind many other tag managers.
And on that note.. it's certainly not the first time your scenario has come up. I have heard lots of people mention it, most commonly for sites that use frameworks like backbone or node, where not everything is actually loaded by dom ready, but is instead loaded through modules, etc. It is even mentioned as an idea on ideas.omniture.com to allow for exactly what you want (better control over s.t call).
I think that having basically no control over when DTM outputs tools' triggers on initial page load is a huge fundamental flaw in a tag manager, especially when so many pages just don't function like that in the real (virtual) world. So I expect (hope) Adobe will address that (hopefully sooner rather than later).
It is Adobe Analytics specific, so for example if you have GA implemented as a tool within DTM's interface, it's going to have the same behavior with GA's _trackPageview (or UA equiv) call, and AFAIK GA has no s.abort equiv. IOW this is tool-specific, not rule-specific
You can also abort the consequent tracking call to GA from within the ADTM interface: "return false;
From https://marketing.adobe.com/resources/help/en_US/dtm/ga.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With