nwayo | 🌰 A multi-theme , multi-site , multi-cms front end framework | Application Framework library
kandi X-RAY | nwayo Summary
kandi X-RAY | nwayo Summary
/nwajo/ (haitian creole) The tough central part of various fruits, containing the seeds.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Abort the token
- Duplicated
- reusable code
- utility function
- arr - > array
- This code replacement
- the main function
- the points of a triangle
- Tires an object
- Return a TURN
nwayo Key Features
nwayo Examples and Code Snippets
Community Discussions
Trending Discussions on nwayo
QUESTION
I'm trying to do some tracking on a specific element of a website, without being able to implement a data layer in the code (development budget is limited at the moment). I'm trying to base my trigger on a CSS selector but it's not working so far.
We have three boxes that are located under the add to cart on https://www.sail.ca/en/browning-high-noon-spotlight-modb-197590. We want to know which of these is being clicked the most.
Here is the code for the 3 boxes :
...ANSWER
Answered 2018-Sep-20 at 08:14Make sure your click trigger is of the "links only" type. If you have an "click on all elements" then chances are that Click Element is not the element with the attribute, but the image contained within.
This has to do with the way GTM attaches event handlers. GTM does not attach event handlers to elements directly. Instead it attaches event handlers to the document. When an element is clicked the event bubbles up through the DOM until it arrives at the document node. There the target element (Click Element) is inspected if it matches the condition specified in the filter of the click trigger.
If you do a "links only" trigger GTM actually looks at the links only, and since your link has the data attribute that should work for you.
This is a robust way to make sure that events are triggered for dynamically created elements, but it means that it's no always easy to get the desired Click Element.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install nwayo
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page