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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Control the precedence/order of DTM Rules

Avatar

Avatar
Give Back 3
Level 5
eddie_miller11
Level 5

Likes

118 likes

Total Posts

42 posts

Correct reply

0 solutions
Top badges earned
Give Back 3
Give Back
Ignite 1
Validate 1
Boost 50
View profile

Avatar
Give Back 3
Level 5
eddie_miller11
Level 5

Likes

118 likes

Total Posts

42 posts

Correct reply

0 solutions
Top badges earned
Give Back 3
Give Back
Ignite 1
Validate 1
Boost 50
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
Ignite 3
Level 9
Josh_Du
Level 9

Likes

275 likes

Total Posts

241 posts

Correct reply

70 solutions
Top badges earned
Ignite 3
Ignite 1
Give Back 100
Give Back 50
Give Back 25
View profile

Avatar
Ignite 3
Level 9
Josh_Du
Level 9

Likes

275 likes

Total Posts

241 posts

Correct reply

70 solutions
Top badges earned
Ignite 3
Ignite 1
Give Back 100
Give Back 50
Give Back 25
View profile
Josh_Du
Level 9

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
Give Back
Level 5
dreisch-wiley
Level 5

Likes

101 likes

Total Posts

61 posts

Correct reply

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

Avatar
Give Back
Level 5
dreisch-wiley
Level 5

Likes

101 likes

Total Posts

61 posts

Correct reply

1 solution
Top badges earned
Give Back
Boost 50
Boost 5
Boost 3
Boost 25
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.