Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DTM - s.t function and page load rules relation

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:

  • In DTM can I control when the s.t function gets triggered?
  • Is s.t function triggering independent from Adobe Analytics Page Load rules (using custom code)?
  • Has anyone of you used a system of callbacks to make sure a specific Page Load Rule has been loaded before firing Adobe Analytics request?

Thank you all

like image 847
sevvecz Avatar asked Oct 06 '14 15:10

sevvecz


2 Answers

  • In DTM can I control when the s.t function gets triggered? You can specify to load at "top" or "bottom" of page (see chart you linked).
  • Is s.t function triggering independent from Adobe Analytics Page Load rules (using custom code)? DTM will trigger the s.t call when the tool is loaded, placing the s.t call at "top" or "bottom", depending on what you set in config. This will happen with or without a page load rule. However, page load rules ARE dependent of where the s.t call is made. For example, if you set Adobe Analytics to trigger on "top" but set your page load rule to trigger on "bottom", window loaded, dom ready, etc (sometime after "top"), then whatever vars you have set in the page load rule will NOT happen on the s.t call, since it has already happened.
  • Has anyone of you used a system of callbacks to make sure a specific Page Load Rule has been loaded before firing Adobe Analytics request? This is not currently possible in DTM, using the Adobe Analytics integration. There is NO way to tell DTM to NOT trigger the s.t call or otherwise manually invoke it. Even if you specify "bottom" and then remove _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

  1. It only suppresses the next actual request; it does NOT suppress everything running up to it (e.g. s_doPlugins)
  2. 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.

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).

like image 170
Crayon Violent Avatar answered Oct 15 '22 09:10

Crayon Violent


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

like image 27
George Spanidis Avatar answered Oct 15 '22 08:10

George Spanidis