DTM Firing Priorities / Sequential execution

Avatar

Avatar

ehsanketa

Avatar

ehsanketa

ehsanketa

12-01-2016

Use Case:

I need 2 JS scripts to run in a specific order. 1 script is an API call with a callback which needs to be declared AFTER another script that defines the callback.

I need both of these to run BEFORE s.t() runs or before the app measurement library loads.

Questions: 

How do I prioritize page rule tags to fire in a specific order? 

How do I ENSURE the adobe s.t() call fires last.

I understand all the JS is asynchronous but what can we do ensure firing order is preserved?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

gabrieles699485

Avatar

gabrieles699485

gabrieles699485

15-01-2016

Hi,

if you set properly the Adobe Analytics tool, then in my personal experience every conditioning "trigger" available (top of page, bottom, dom-ready) except from "window-load", runs before the AA tracking request.

So you should write your javascript code in the dedicated custom code section on each of these two rules. Check load order here to decide better the trigger and synchronous/asynchronous loading: https://marketing.adobe.com/resources/help/en_US/dtm/load_order.html

You can create 1 rule with a "top of page" trigger where you write the first script code, then a second one with trigger "page bottom" which can use the first resource. Both of these rules should be executed before the AA tracking.

Hope to be clear enough

Gabriele

Answers (0)