Activity Map skips a hit when sending consecutive s.tl() hits in the same page | Community
Skip to main content
yuhuisg
Community Advisor
Community Advisor
November 28, 2020
Solved

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

  • November 28, 2020
  • 3 replies
  • 2667 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by yuhuisg

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

3 replies

shelly-goel
Adobe Employee
Adobe Employee
November 28, 2020
yuhuisg
Community Advisor
yuhuisgCommunity AdvisorAuthorAccepted solution
Community Advisor
November 30, 2020

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);
yuhuisg
Community Advisor
yuhuisgCommunity AdvisorAuthor
Community Advisor
November 30, 2020

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

December 7, 2021

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?