Reputation: 145
I am trying to do a simple tag that measures the amount of times an element is clicked.
I got into difficulty so I looked to find a video to help because tag manager layout had changed.
I follow the following Free tutorial on Udemy
https://www.udemy.com/google-tag-manager-advanced/
Specifically chapter 8 Button Click - which is a free chapter. It tells me to setup the following options:
Tag Configuration:
Google Analytics Tracking ID: {{Tracking ID}} Track Type: Event Category: Click Action: Homepage CTA Button Label: (blank) Value: (value)
Then on the trigger:
Add a new one. Name it - click on homepage button
Add “Just Links”
He ticked the wait for tags
The where it said “Enable this trigger when all of thee conditions are true” he selected
Page Path in the drop down menu.
Now here is where my issue is. When I do exactly the same thing, I only have the following options:
Google Analytics Settings Page Hostname Page Path Page URL Referrer New Variable…
Now the new Variable send to to a new window which gives me the following options:
Navigation: http referrer URL
Page Variables: 1st-Party Cookie Custom Javascript Data Layer Variable JavaScript Variable
Page Elements: Auto-Event Variable DOM Element
Utilities: Constant Custom Event Environment Name Google Analytics Settings Lookup Table Random Number
Container Data: Container ID Container Version Number Debug Mode
So how do I setup the trigger to load on every page and track if someone clicks on the element with a CSS ID of menu-item-6825???
Totally lost on this one.
Upvotes: 1
Views: 9221
Reputation: 8736
In your case you need:
1) Go to "Variables" menu in the sidebar.
2) Click "Configure"
3) Enable "Click Classes", "Click ID", "Click Element" variable
After this steps, you need to configure trigger and create condition: Click ID
- equals
- menu-item-6825
. OR condition like that: Click Element
- matches CSS selector
- #menu-item-6825
. Both conditions are doing the same thing.
Upvotes: 5