Highlighted

Event based rule not firing on a link

Avatar

Avatar

danielr53452174

Avatar

danielr53452174

danielr53452174

15-10-2015

Hi,

I'm having an issue where it looks like DTM is not detecting a click on an <a> tag

The link looks like this

<a href="javascript:;" class="ripplelink" data-rel="spending-based" rel="Needs-based" title="Select spending based"><img src="/views/main/images/tick-icon.png" alt="select-icon"></a>

I've set an event based rule to fire on the click of an <a> tag where rel=spending-based but looking in the console it looks like DTM doesn't detect a click on the <a> at all. Everything else seems to show up fine.

Any help would be greatly appreciated!

Thanks

Replies

Highlighted

Avatar

Avatar

TanmayMathur

Employee

Total Posts

1.2K

Likes

241

Correct Answer

421

Avatar

TanmayMathur

Employee

Total Posts

1.2K

Likes

241

Correct Answer

421
TanmayMathur
Employee

15-10-2015

Hi, 

Assuming you set the rule correctly it might be possible that you are not addressing the right class of the element. Could you check in your pagecode if there is a 'span' under your 'a' class ? 

It would be great if you could show us a screenshot of your link element code and your event based rule condition in DTM.

Regards,

TM

Highlighted

Avatar

Avatar

danielr53452174

Avatar

danielr53452174

danielr53452174

15-10-2015

Hi TM,

Thanks for your reply - I've attached the screenshots as requested. I've tried addressing pretty much every property and I can't get the rule to fire. In the console the click on the <a> link doesn't show at all.

Daniel

Highlighted

Avatar

Avatar

Rahsing

Avatar

Rahsing

Rahsing

15-10-2015

Daniel,

I think you'll need to specify the class under the element tag.

Try passing 'ripplelink' instead of 'a' into the element tag and see if it works.

Rahul

Highlighted

Avatar

Avatar

Rahsing

Avatar

Rahsing

Rahsing

15-10-2015

Also, uncheck the 'manually assign properties & attributes' option.