S
S
Sergey Sergeev2018-02-06 14:13:21
Google
Sergey Sergeev, 2018-02-06 14:13:21

How to get element attribute on click in Google Tag Manager?

At the moment I am working on a manual for connecting the recommendation service to the site through Google Tag Manager.
Idea: to provide an opportunity for owners of online stores to connect the service without editing the site code and involving programmers. This is what GTM was created for.
Questions:
1. Is it possible to determine the attribute of the tag on which the click was made using GTM tools? (for example, when clicking on the "details" button, get the "data-product_id" attribute)
2. Is it possible to write several tag values ​​with the same class into a variable. (collect order id in cart)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2018-02-06
@dimonchik2013

https://www.optimizesmart.com/introduction-to-dom-...
https://www.simoahava.com/analytics/capturing-the-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question