DTM - Attach click even to a link that doesn't have ID

Avatar

Avatar

amine74235389

Avatar

amine74235389

amine74235389

05-01-2017

Hi,

I have a page that has a link. Unfortunately the link does not have an ID and I can't add one (technical issues with CMS). I have jQuery/JS code that can listen for the link click and fire a pixel, but I'm not sure how to create the rule in DTM.

The jQuery is something like this:

$("a").click(function(){

    if($("a").attr('data-utc')=="12345")
       //Fire pixel    
});

Any idea how to create such custom rule in DTM?

View Entire Topic

Avatar

Avatar

amine74235389

Avatar

amine74235389

amine74235389

06-01-2017

I used the above with regex and it worked. Thank you.