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

SOLVED

Order of execution of _satellite.track

divyatej_akella
Level 2
Level 2

Hi Team,

I am working on a POC in launch where I am calling different direct call rules in a for loop.

Ex: rules.forEach(function(rule){
     _satellite.track(rule);
});

I am interested to know how this execution will happen. Right now I tested it for 3 rules. I am observing that rules triggered message but the execution of the contents of rule is a bit delayed than the rule fired message.

The reason for doing this experiment is having the ability to add all rules that should be non blocking as direct cal rules and start calling them at the end of the page. I think this will give the current DTM behaviour of third party scripts as async.

Can you please let me know the steps in execution of direct call rules and how custom scripts that we added in direct call rule will execute?

1 Accepted Solution
Aaronius9er9er9
Correct answer by
Employee
Employee

Hi there.

When you call _satellite.track(), the actions for the rule will be triggered immediately. The actual task that the action performs may be asynchronous though. It sounds like you're dealing with rules using the Custom Code action. If the rules use a Page Top or Page Bottom event, the custom code will already be embedded in the Launch library and will run immediately. If the rules use an event that is NOT Page Top or Page Bottom, the custom code will be loaded asynchronously as separate files.

This may be helpful for you to read: Load Order for Rules :: DTM vs. Launch

View solution in original post

0 Replies
Aaronius9er9er9
Correct answer by
Employee
Employee

Hi there.

When you call _satellite.track(), the actions for the rule will be triggered immediately. The actual task that the action performs may be asynchronous though. It sounds like you're dealing with rules using the Custom Code action. If the rules use a Page Top or Page Bottom event, the custom code will already be embedded in the Launch library and will run immediately. If the rules use an event that is NOT Page Top or Page Bottom, the custom code will be loaded asynchronously as separate files.

This may be helpful for you to read: Load Order for Rules :: DTM vs. Launch

View solution in original post

divyatej_akella
Level 2
Level 2

Thanks for the reply. This answers the questions that I have.