Click events in Launch using div id

Avatar

Avatar

Jmaguire

Avatar

Jmaguire

Jmaguire

09-03-2021

Hi,

 

I'm looking to tracking click interaction with elements on my homepage using CSS selectors.

 

I can see the option for a rule in Launch based on click but unsure what syntax to specify under "Elements matching the CSS selector".

 

The selector I'll be looking for interaction on is <div id="addButton"> or <div id="minusButton">.

 

Thanks,

James

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

evolytics_brian

MVP

Avatar

evolytics_brian

MVP

evolytics_brian
MVP

09-03-2021

@Jmaguire -

It's just looking for a basic selector, the same you would use with document.querySelector() or document.querySelectorAll(). For the two DIVs in your question, since they have unique IDs (at least, the IDs should be unique on the page), you can use #addButton and #minusButton, respectively.

 

More on selectors here.

Answers (0)