简体   繁体   中英

Click tracking with Google Tag Manager

I'm new to GTM, coming from GA.

In GA, if I wanted to track clicks to a given element, I would place that code in an onclick event.

How would one accomplish this with a GTM tag?

Suppose I have:

<div id="click_me" >
    ** hot new content **
</div>

I would like to create a tag to track every time this element is clicked.

I have already set up the GTM container on my site, along with GA, and connected the two with a "Universal Analytics" tag, all of which seems to be correctly configured like so..

在此处输入图片说明

Where do I go from here?

You should refer to this resource on how to create an event tag to track your clicks: https://support.google.com/analytics/answer/6164470?hl=en

Your trigger would be based on the ID that is clicked and could look something like this: 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM