Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

Multiple Adobe Analytics Server Call!

Avatar

Level 4

Hi,

I have implemented few events in the DTM and you can see the following event is on Kudo. When i click on kudo you can see 4 Analytics server calls in the below screenshot and in all the server calls data is same. I am not sure why this is happening. This will send the duplicate values in AA? or should i ignore such things?

1516091_pastedImage_0.png

Thanks in advance!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I think I have your answer.  I found it in another question that you asked : Uncaught TypeError: jQuery is not a function

In that question you shared this code:

function bindKudoEvent() {

  jQuery('.lia-button-image-kudos-kudoed a.kudos-link').on('click', function(e) {

    var isAcceptedSol = jQuery(this).parents('.lia-message-view-display').hasClass('lia-accepted-solution');

    trackClickTkb(0, "kudo count", isAcceptedSol)

    setTimeout(function() {

      bindKudoEvent()

    }, 3500);

  });

  jQuery('.lia-button-image-kudos-not-kudoed a.kudos-link').on('click', function(e) {

    var isAcceptedSol = jQuery(this).parents('.lia-message-view-display').hasClass('lia-accepted-solution');

    trackClickTkb(1, "kudo count", isAcceptedSol)

    setTimeout(function() {

     bindKudoEvent()

    }, 3500);

  });

}

bindKudoEvent();

This code is recursing (calling itself) and installing multiple click listeners on your button.

You end up getting a new event listener installed every 3.5 seconds.

That means that if you sat on the page for 36 seconds (assuming that the 1st call to bindKudoEvent() happened at second 1), and then clicked the button,

      trackClickTkb(0,"kudo count",isAcceptedSol)

would be fired 10 times.

DTM is very good at listening for click events. You should just use DTM event rules for this sort of thing.

View solution in original post

9 Replies

Avatar

Community Advisor

I saw this and another message here on board. It looks like you are trying to define 3 separate actions as events triggered in DTM. Would that be a correct assessment?

Also what type of DTM events are you using? page load, event based? Direct call?

Avatar

Level 4

Hi Pablo,

Thanks for the quick reply, I have written multiple events under the SC tool > Customize Page Code > Open Editor section. And fired multiple s.tl() function on events.

1516935_pastedImage_2.png

Thanks!

Avatar

Community Advisor

With out seeing beacons firing its hard to tell if they are necessary duplicates... Are you trying to basically capture users Kudos states?

Have you then defined lets say 3 different events for each state?

Avatar

Level 4

I found following issue on debug mode due to that duplicates values are being passed to the Analytics, when ever i clicked on any a href tag it's automatically triggered other events which is already fired before this action.  How can we stop this because i have not implemented such things in DTM.

1517274_pastedImage_0.png

Another thing is how we can retrieve the value from the Satellite "as you can see the above screenshot SATELLITE: detect click on A" through the DTM JS Code?

Thanks!

Avatar

Community Advisor and Adobe Champion

Dear Roshan,

Can you share the public URL so that we can validate and get back to you?

If not in forum, you can ping us separately.

Thank You

Arun

Avatar

Community Advisor

ok I think I know what is happening...

Activity map is part of a main beacon call.. its pre-built to do exactly that measure click usage of links or buttons.

Is your app firing the main scode each time a link is clicked?? Basically you should only fire it for each new pageload/refresh.

If you have tagged your page correctly, then don't try and manually fire beacon from link click(activity map will do this) just make sure main code fires page to page(activey map will record most lnk info on destination beacon.

If you must manually fire link tracking then use whats called s.tl call(fires a seperate beacon) but does not do a pageview.

Goodluck

Avatar

Correct answer by
Community Advisor

I think I have your answer.  I found it in another question that you asked : Uncaught TypeError: jQuery is not a function

In that question you shared this code:

function bindKudoEvent() {

  jQuery('.lia-button-image-kudos-kudoed a.kudos-link').on('click', function(e) {

    var isAcceptedSol = jQuery(this).parents('.lia-message-view-display').hasClass('lia-accepted-solution');

    trackClickTkb(0, "kudo count", isAcceptedSol)

    setTimeout(function() {

      bindKudoEvent()

    }, 3500);

  });

  jQuery('.lia-button-image-kudos-not-kudoed a.kudos-link').on('click', function(e) {

    var isAcceptedSol = jQuery(this).parents('.lia-message-view-display').hasClass('lia-accepted-solution');

    trackClickTkb(1, "kudo count", isAcceptedSol)

    setTimeout(function() {

     bindKudoEvent()

    }, 3500);

  });

}

bindKudoEvent();

This code is recursing (calling itself) and installing multiple click listeners on your button.

You end up getting a new event listener installed every 3.5 seconds.

That means that if you sat on the page for 36 seconds (assuming that the 1st call to bindKudoEvent() happened at second 1), and then clicked the button,

      trackClickTkb(0,"kudo count",isAcceptedSol)

would be fired 10 times.

DTM is very good at listening for click events. You should just use DTM event rules for this sort of thing.

Avatar

Community Advisor

Did this solve your issue? I'm curious to know.