Order of execution of _satellite.track



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){

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?

Accepted Solutions (1)

Accepted Solutions (1)




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