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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

DTM | Event Based Rule

jay_patel
Level 2
Level 2

I’m trying to setup an event (button click) based rule for a my site in DTM.

The button has the following;

·         Inner HTML - <span class="btn-value">Next</span> <i class="icon--next"></i>

·         Outer HTML - <button type="button" name="next" class="btn cta centered-mobile btn--next" id="trigger-step2" data-step="1"><span class="btn-value">Next</span><i class="icon--next"></i></button>

·         CSS selector - button.cta:nth-child(1)

I tried creating the rule based on the css selector (button.cta:nth-child(1)) & also without the CSS filter (button#trigger-step2), but neither option worked.

Could someone please provide any guidance on what I’m doing wrong?

Thanks!

1 Accepted Solution
Rahsing
Correct answer by
Level 8
Level 8

Hi Jay,

I'm not sure why this isn't working but as an alternative, you can try using a data element for implementing this.

Here's some documentation on it.

Regards

Rahul

View solution in original post

1 Reply
Rahsing
Correct answer by
Level 8
Level 8

Hi Jay,

I'm not sure why this isn't working but as an alternative, you can try using a data element for implementing this.

Here's some documentation on it.

Regards

Rahul

View solution in original post