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

Event Based Rule to Fire on Multiple Element Tag or Selectors

Avatar

Avatar
Validate 1
Level 1
Thomas_S_DLX
Level 1

Likes

3 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 1
Thomas_S_DLX
Level 1

Likes

3 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile
Thomas_S_DLX
Level 1

13-11-2017

I am trying to have a single event base rule fire on two different button clicks. I can only get one to work at a time so I had to create two different rules.

I tried using the classes, data-ceid, etc. If I do one at a time they both work, hence I implemented two event rules, but how could I have done this with one rule?

<button style="padding-top: 7px; padding-bottom: 7px; padding-right: 35px; margin-bottom: 7px;" class="red-button-lg eh-cta" title="Top Submit" data-ceid="Top Submit Button"><img style="padding-left: 0;" src="/sites/www.xyz.com/files/arrow.png" alt=""><span style="display:inline-block; padding-top:10px; padding-left: 20px;">Sign up today</span></button>

<button class="buttonicon talk eh-cta" title="Bottom Let's Talk" data-ceid="Bottom Let's Talk" type="button">

          <img alt="" src="/sites/www.xyz.com/files/arrow.png" style="padding-left: 0; width: 42px; height: 42px;">

          <span style="display:inline-block; padding-top:7px">Sign up today</span></button>

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Contributor
MVP
joshd7227840
MVP

Likes

275 likes

Total Posts

241 posts

Correct Reply

70 solutions
Top badges earned
Contributor
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Contributor
MVP
joshd7227840
MVP

Likes

275 likes

Total Posts

241 posts

Correct Reply

70 solutions
Top badges earned
Contributor
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile
joshd7227840
MVP

15-11-2017

In the Element Tag or Selector field, you can separate multiple selectors with a comma. For example, based on what you highlighted red in your post, you can use this:

button.red-button-lg.eh-cta[data-ceid="Top Submit Button"],button.buttonicon.talk.eh-cta[data-ceid="Bottom Let\'s Talk"]

Answers (1)

Answers (1)

Avatar

Avatar
Seeker
Moderator
PratheepArunRaj
Moderator

Likes

314 likes

Total Posts

866 posts

Correct Reply

264 solutions
Top badges earned
Seeker
Bedrock
Engage 1
Affirm 250
Contributor
View profile

Avatar
Seeker
Moderator
PratheepArunRaj
Moderator

Likes

314 likes

Total Posts

866 posts

Correct Reply

264 solutions
Top badges earned
Seeker
Bedrock
Engage 1
Affirm 250
Contributor
View profile
PratheepArunRaj
Moderator

13-11-2017

Hello Thomas,

1. Under Event Based Rules, try to assign Propetries and Values in manual : Below the screen grab.

Answer1.png

2. If the above solution didnt work, Create a Page Load Rule. Under Javascript/Third Party Tags, customize you JavaScript coding to fire the specific events for both the buttons on on-click action. This should definitly work!

Thank You!

Arun