Skip to content
Start now

Simply record clicks on elements together

Tips & Tricks
1 Minute Reading time
Content
Simply record clicks on elements that consist of several parts together.

by Katrin Nebermann

Simply record clicks on elements that consist of several parts together.

CSS selectors make it very easy to measure events on websites without having to use developer resources and make changes to the HTML code.

Challenge:

Sometimes clickable elements consist of several individual selectors, such as for the center and frame of a button. In this case, if you only select the selector for the button center without a frame, not all clicks are counted.

How are all clicks on the button recorded?

Solution:

As a CSS selector, both selectors can be entered comma-separated so that clicks are recorded both centrally on the button and at the edge of the button.

Eingabe-Schema: [Selekor#1], [Selektor#2], [Selektor#n]

The entry in the configuration of the CSS selector events under Settings → CSS selector events could look like this, for example:

#main-content > div > div:nth-child(37) > ul > li > a, #main-content > div > div:nth-child(37) > ul > li > a > span

More on the topic