Multiple CSS element selectors

Avatar

Avatar
Validate 1
Level 1
alexf40
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
alexf40
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
alexf40
Level 1

22-01-2017

Hi, how is it possible to setup an event based rule which is fired off two button clicks? E.g. conversion page which has save order button and continue order, I want to fire the same tag on both buttons. I'm not sure if I can have two element selections in the Element Tag or Selector field.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1000
Community Manager
jantzen_belliston-Adobe
Community Manager

Likes

339 likes

Total Posts

2,333 posts

Correct reply

819 solutions
Top badges earned
Validate 1000
Springboard
Validate 500
Validate 250
Validate 100
View profile

Avatar
Validate 1000
Community Manager
jantzen_belliston-Adobe
Community Manager

Likes

339 likes

Total Posts

2,333 posts

Correct reply

819 solutions
Top badges earned
Validate 1000
Springboard
Validate 500
Validate 250
Validate 100
View profile
jantzen_belliston-Adobe
Community Manager

23-01-2017

Hi Alex,

You'd want to create an event-based rule with a click event type. For the tag, you'd want to use a selector that was generic enough to match both buttons. Finally, you'll use conditions to ensure it only fires when appropriate. You could use something like the path condition to ensure it only fires on the pages where the button is located. If the buttons are on different pages, you can add multiple path conditions and they will function like "or" operators.

 

Cheers,
Jantzen

 

EDIT: Marking as correct as this answer best answers the general question. Additional responses are specific to this use case.

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1000
Community Manager
jantzen_belliston-Adobe
Community Manager

Likes

339 likes

Total Posts

2,333 posts

Correct reply

819 solutions
Top badges earned
Validate 1000
Springboard
Validate 500
Validate 250
Validate 100
View profile

Avatar
Validate 1000
Community Manager
jantzen_belliston-Adobe
Community Manager

Likes

339 likes

Total Posts

2,333 posts

Correct reply

819 solutions
Top badges earned
Validate 1000
Springboard
Validate 500
Validate 250
Validate 100
View profile
jantzen_belliston-Adobe
Community Manager

23-01-2017

I don't believe the CSS selector field supports any kind of logic. The condition fields do support regex and I see there is a condition for hash so that might work for your single page app.

Additionally, there is a custom condition element that will allow you to write your own script that returns true when you'd like the rule to fire. 

Avatar

Avatar
Validate 1
Level 1
alexf40
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
alexf40
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
alexf40
Level 1

23-01-2017

Thanks Jantzen, the problem I'm having is that it's an angular.js site, there aren't actually any unique pages in this process. Can you have any and/or operators in the CSS element selector?