Dynamic Links Adobe Target tracking | Community
Skip to main content
johnuff
Level 2
November 13, 2020
Solved

Dynamic Links Adobe Target tracking

  • November 13, 2020
  • 1 reply
  • 2723 views

I am trying to track dynamic links via AT, in the editor i have the right selectors see image, these link are dynamically added to the pages after page load so don't receive the AT class .at-element-click-tracking. Any ideas how i can track these links?

 

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 evidana

Are you trying to have all of those function as conversion mbox events? Could just put a click handler on all of them via client side js and fire off a trackEvent call.

 

Something like

 

function fireConversion() { window.adobe.target.trackEvent({'mbox':'facetClick'}) } document.querySelectorAll('div.someclass').forEach((d)=> { d.addEventListener("click", fireConversion); });

1 reply

evidanaCommunity AdvisorAccepted solution
Community Advisor
November 13, 2020

Are you trying to have all of those function as conversion mbox events? Could just put a click handler on all of them via client side js and fire off a trackEvent call.

 

Something like

 

function fireConversion() { window.adobe.target.trackEvent({'mbox':'facetClick'}) } document.querySelectorAll('div.someclass').forEach((d)=> { d.addEventListener("click", fireConversion); });
johnuff
johnuffAuthor
Level 2
November 19, 2020

@zach_shearer thanks yeah I know about forEach and ie11 and i would have loved to write the functionality in es6.