Expand my Community achievements bar.

Lanuch Reactor API Rule Component creation for URL condition

Avatar

Level 1

I am coding Reactor API using node.js to create a new rule condition. 

This rule should fire when clicked <a href url contains a perticular pattern (eg. href="tel:123456" condition, href contains "tel:").

I have following API call as example:

....

attributes: {

name: 'click-event',

settings: JSON.stringify({

bubbleFireIfChildFired: true,

bubbleFireIfParent: true,

elementSelector: 'a#checkout'

}),

order: 0,

delegate_descriptor_id: 'core::events::click'

},
.......

 

What should the settings / elementSelector contain - so that this fires when URL contains a perticular patteren?
I am new to the API, hence apologies if I am asking a basic question.

 

Thanks in advance.

Regards

 

2 Replies

Avatar

Community Advisor

Hello @varun_d 

 

Create a rule with element seelctor a[href^="tel:"]

 


     Manoj
     Find me on LinkedIn

Avatar

Level 1

Thanks a lot @Manoj_Kumar_ . Where can I read more about the API calls & related documentation?