'Google Tag Manager not picking up CSS Selector
I'm currently trying to get Google Tag Manager to fire a click tag on my homepage for particular elements on the page. Not all elements are links so I'm using: Click - All Elements >> Some Clicks as my trigger type and added a condition of a specific CSS Selector for the tag to fire.
GTM is saying it does not see the value matching in the CSS however when I look at the Tag Details, I can see that there should be a match: Tag Details page. I've also tried matching RegEx matching the click element and tried form element as well. The value is present in both of these when looking at "variables" in the GTM preview.
I'm looking to capture the click text within each of the sections of the homepage to determine which section is getting the most attention without getting the clutter of accidental clicks on nothing.
Solution 1:[1]
You shouldn't really share the site you're working on. That may be interpreted as link spam, especially from new accounts.
Try using this:
Click - All Elements ->
Some Clicks ->
Click Element ->
Matching CSS selector ->
And then this selector: #featured-services, #featured-services *
If this doesn't completely fix your issue, add a screenshot of your trigger as well as the block of HTML as text for us to be able to narrow it down.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | BNazaruk |
