Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Event based rule not firing on a link

Avatar

Level 1

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

0 Replies

Avatar

Level 10

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

Avatar

Level 1

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

Avatar

Level 8

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

Avatar

Level 8

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