Why define goals using the selector?
Although defining goals using the button text is much easier, sometimes it is not feasible.
- If there isn't a text on the element you want to define as a goal
- If the same text is used by multiple different elements on the same page and you only want to select one.
In other cases, we advise non-technical users to define their goals using text.
How to get the CSS selector of a button
- Hover the cursor over the button you want to define as a goal and right-click the mouse to select Inspect
- Right-click on the highlighted code. Select Copy > Copy selector
- Paste it into the 'Click with Selector' input in the Goals tab of your dashboard