Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Control the precedence/order of DTM Rules

Avatar

Avatar
Validate 1
Level 5
eddie_miller11
Level 5

Likes

118 likes

Total Posts

42 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
Level 5
eddie_miller11
Level 5

Likes

118 likes

Total Posts

42 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
eddie_miller11
Level 5

22-04-2015

hi

 

having the ability to specify precedence or order override when mutiple rules match would be very helpful. 

2 Comments

Avatar

Avatar
Contributor
MVP
joshd7227840
MVP

Likes

275 likes

Total Posts

241 posts

Correct Reply

70 solutions
Top badges earned
Contributor
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Contributor
MVP
joshd7227840
MVP

Likes

275 likes

Total Posts

241 posts

Correct Reply

70 solutions
Top badges earned
Contributor
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile
joshd7227840
MVP

29-04-2015

My unofficial understanding is that the order of operation is firstly based on the Trigger Rule At setting:

 

Top of Page > Bottom of Page > DOM Ready > Onload

 

Then, for each rule during those "phases",  order of operation is based on the order they appear in the rule listing, and near as I can tell, that order is based on alphabetical sorting.  So for example if you prefix them with something sequential e.g. 


01 - Some rule

02 - Rule 2

03 - some other rule

etc..

 

it will show up in the listing in that order and execute in that order.  

 

I have not completely reverse engineered the satellite library to find out 100% if this is true but from basic testing (outputting a console.log() value in each rule) this appears to be true. 

 

However.. this doesn't really guarantee that everything in rule "A" will be evaluated before rule "B".  For example, if rule "A" has some code that dynamically creates a script tag asynchronously, or has something in a setTimeout, etc.. it is very likely rule "B" will start evaluation before that is finished. So, you need to take into consideration what code is actually in a given rule, as well. 

Avatar

Avatar
Boost 50
Level 5
dreisch-wiley
Level 5

Likes

101 likes

Total Posts

61 posts

Correct Reply

1 solution
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 25
Boost 100
View profile

Avatar
Boost 50
Level 5
dreisch-wiley
Level 5

Likes

101 likes

Total Posts

61 posts

Correct Reply

1 solution
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 25
Boost 100
View profile
dreisch-wiley
Level 5

11-09-2015

__josh, I am not experiencing what you are describing. I started ensuring that my (non-async, adobe-only) rules that fire at the same are alpha-ordered and they still fire out-of-order. 

 

This is a frustrating missing feature of DTM.