Expand my Community achievements bar.

Webinar: Adobe Customer Journey Analytics Product Innovations: A Quarterly Overview. Come learn for the Adobe Analytics Product team who will be covering AJO reporting, Graph-based Stitching, guided analysis for CJA, and more!
SOLVED

Activity Map skips a hit when sending consecutive s.tl() hits in the same page

Avatar

Community Advisor

I have a situation where in one page, we have multiple buttons that open the same overlay within the page. However, each button has been coded as a DIV element, with a click event added to it.

I've added "s_objectID" to each of these DIVs. When I click all of them, I expect Activity Map to record that particular DIV's s_objectID. Each DIV click also sends a s.tl() Custom Link hit with a name for that DIV.

Here's what I've found:

  1. Click first DIV:
    1. s.tl() is sent with correct DIV name.
    2. Activity Map is set with that DIV's s_objectID.
  2. Click second DIV:
    1. s.tl() is sent with correct DIV name.
    2. Activity Map is NOT set!
  3. Click third DIV:
    1. s.tl() is sent with correct DIV name.
    2. Activity Map is set with the second DIV's s_objectID!
  4. Click fourth DIV:
    1. s.tl() is sent with correct DIV name.
    2. Activity Map is set with the third DIV's s_objectID!
  5. etc.

I think this behaviour occurs because Activity Map expects that after clicking a link that sets Activity Map, the next hit should be a s.t() Pageview hit. But that is clearly not the case here, because the user can close the overlay, but then click another button to open the same overlay without going to another page nor without a page refresh.

This behaviour also happens when it's a combination of DIV and A elements. As long as there are consecutive s.tl() hits and all of them are expected to set Activity Map, then Activity Map always skips the 2nd one, and then subsequent s.tl() hits have the previous Activity Map data.

I think that this tracking behaviour is a bug, not a feature, of Activity Map. I think Activity Map should track the current clicked element's data, regardless if a pageview hit (or some other condition that I'm not aware of) has occurred.

Is there a workaround for this Activity Map bug?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Got this solution from Frederik Werner: add a delay when firing s.tl().

E.g.

// delay s.tl() call for 500 ms
setTimeout(function() {
  ...
  s.tl(this, 'o', '...');
}, 500);

View solution in original post

7 Replies

Avatar

Correct answer by
Community Advisor

Got this solution from Frederik Werner: add a delay when firing s.tl().

E.g.

// delay s.tl() call for 500 ms
setTimeout(function() {
  ...
  s.tl(this, 'o', '...');
}, 500);

Avatar

Community Advisor

Aside: This forum's code formatting is weird... such a large font for the "500" number... @jantzen_b 

Avatar

Employee Advisor
@yuhuisg Thanks for sharing that adding a delay is preventing the mixing of data between two s.tl() calls. Would like to understand, if clearVars would resolve the issue as well or not and if there would be any other constraints in using it in this case?

Avatar

Community Advisor
@shelly-goel I didn't try the clearVars method. I personally don't like it because it clears out all variables, whereas I want to keep some variables between hits.

Avatar

Level 10
@yuhuisg - Thanks for the notification. I agree the formatting is a bit odd. I'll ping our developer to see if this is something we can fix with a quick CSS tweak.

Avatar

Level 1

I have very similar issues. What I have found out so far using Adobe Launch:

 

  1. If using the built in s.tl() action in Adobe Launch:
    • Activity Map Information is only set, read and sent if the element clicked is wrapped inside a link = <a>bla</a> tag.
  2. If using custom code in the action section like "s.tl(this, 'o', linkName)":
    • Activity Map Information is always set, read and sent.
  3. If this is an exit link or a download link activity map works like a charm.
  4. Anyway: in the two first cases the s_sq cookie which stores the activity map information for the consecutive page call is not always cleared. This leads to the situation that on the next beacon the same activity map information will be sent again (happens on page reload, back navigation or any clicked element that is tracked with a beacon but does not update activity map information in s_sq cookie).

My solution would be clearing the "s_sq cookie" on "registerPostTrackCallback" function using Util.CookieWrite.

 

So my question is: Is this last step where I clear the cookie necessary or do I miss a detail?