Expand my Community achievements bar.

Join us January 15th for an AMA with Champion Achaia Walton, who will be talking about her article on Event-Based Reporting and Measuring Content Groups!
SOLVED

Asynchronous / Parallel Calls Tracking Question

Avatar

Level 2

Hi,

 

Does Adobe Analytics allow 2 separate tracking calls (1 event, 1 page load) to be fired in parallel when code is implemented asynchronously?

If so is any particular set-up / config required

 

Issue:

At present conflicts are occurring, causing incorrect data to be returned, where an event & page load satellite track calls are being fired in parallel. Code is being fired asynchronously.

 

We have implemented a delay to event tracking call so as not to enter in conflict with page load tracking.

 

Have tried Rule ordering in Launch but it didn’t solve issue.

 

Current Adobe Analytics Implementation

  • Via Adobe Launch on SPA site using Direct Call Rules
  • Event tracking records error message encountered and page load records loading of returned landing page
  • Tags fired asynchronously
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Allow? Yes. AA doesn't control how you send hits, it's like a sponge that just "happily" accepts whatever you give it. But then, the resulting reports depends on how those hits are received. As you've discovered, if events are tracked before page views, then they can mess up your reports.

You didn't mention what kind of event you're using to track your error messages, so I'll assume that you meant a Direct Call. You also need a reliable way to know that a page load has occurred, and only then to allow the Direct Call to trigger.

One thing that you can try is the following: use 2 Rules with a _satellite.setVar().

Rule 1:

Event: Direct Call

Condition: Value Comparison: %page load occurred% is falsy

Action: custom code:

setTimeout(function() {
  _satellite.track("..."); // run your direct call here
}, 1000);

 

Rule 2:

Event: Direct Call

Condition: Value Comparison: %page load occurred% equals "yes"

Action: track your error message.

 

and also Rule 0, your page load rule (I'm going to assume that you're using "Window Loaded" with this Rule):

Event: Window Loaded

Condition: ... whatever conditions you already have

Actions: whatever actions you already have, and also one more custom code action:

_satellite.setVar("page load occurred", "yes");

Hope you can see the logic that I have here.

View solution in original post

4 Replies

Avatar

Community Advisor and Adobe Champion

Hi,

 

While you should be able to fire them simultaneously, there may be something else going on... 


What sort of error message are you getting, what kind of Event are you triggering?

 

Is it user clicks on a button (that you are trying to record), that button loads a new page and then the page view for the new page happens?

 

Maybe cause the SPA is so quick, the data layer is being re-written before the click can fully be captured...

 

If you would be willing to show us in more detail your error, or share with us the website so we can try ourselves (you can send this in a private message if you like) it would help us to help you.

Avatar

Level 2

Hi

 

I appreciate the quick reply and help offered

 

Many thanks

Avatar

Correct answer by
Community Advisor

Allow? Yes. AA doesn't control how you send hits, it's like a sponge that just "happily" accepts whatever you give it. But then, the resulting reports depends on how those hits are received. As you've discovered, if events are tracked before page views, then they can mess up your reports.

You didn't mention what kind of event you're using to track your error messages, so I'll assume that you meant a Direct Call. You also need a reliable way to know that a page load has occurred, and only then to allow the Direct Call to trigger.

One thing that you can try is the following: use 2 Rules with a _satellite.setVar().

Rule 1:

Event: Direct Call

Condition: Value Comparison: %page load occurred% is falsy

Action: custom code:

setTimeout(function() {
  _satellite.track("..."); // run your direct call here
}, 1000);

 

Rule 2:

Event: Direct Call

Condition: Value Comparison: %page load occurred% equals "yes"

Action: track your error message.

 

and also Rule 0, your page load rule (I'm going to assume that you're using "Window Loaded" with this Rule):

Event: Window Loaded

Condition: ... whatever conditions you already have

Actions: whatever actions you already have, and also one more custom code action:

_satellite.setVar("page load occurred", "yes");

Hope you can see the logic that I have here.

Avatar

Level 2

Many thanks for your quick reply. Much appreciated.

Can confirm that we are using direct call events. Can see logic re making sure a page load has occurred first.
Will look to apply solution suggested