Execution Order of two different direct call rules

thomas_amsler

22-07-2019

On our homepage we have some teasers with internal campaigns that we track when the page loads. There is one additional teaser that loads data via an ajax call. So the page load rule, we are using a direct call rule for this, called "page-load". The found internal campaign codes (in the DOM) are sent in a list variable together with an event. The success handler of this ajax call also executes a direct call rule called "ad-view" and also uses the same list variable and event as it is also an internal campaign. Now sometimes these two direct call rules overlap in a weird way. The first tracking call executed is the "ad-view" from the ajax success handler, but only the event is set, the list variable is empty. Directly after the "page-load" is executed but only contains the campaign from the ajax success handler. The campaigns in the DOM are never sent in this scenario.

It sems the second call "page-load" started before the first "ad-view", but took longer as the rule is way more complex. So the gathered campaigns are overwritten by the second rule. And then somehow the "page-load" rule is done and executes the Clear Variables, but the actual call is not yet sent, but the "ad-view" now has an empty list variable but the tracking call is somehow sent first...

Is there an elegant solution for this other than adding a setTimout to the "ad-view" rule. The order wont work in this case as it is not the same event, if even direct call rules are also considered events.

Accepted Solutions (0)

Answers (0)