Skip to main content
ehsanketa
January 12, 2016
해결됨

DTM Firing Priorities / Sequential execution

  • January 12, 2016
  • 1 답변
  • 1280 조회

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?

이 주제는 답변이 닫혔습니다.
최고의 답변: gabrieles699485

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

1 답변

gabrieles699485
January 15, 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