简体   繁体   中英

Click Element Tracking on Google Tag Manager & Google Analytics Conversion

I have a banner with 3 images on my homepage. I want to track how many people are clicking on one of the image (The specific one) as a conversion on Google analytics. I am planning to use Tag manager trigger to capture this action.

I have added a specific ID called "ciaBannerHome"

On the Tag Manager triggered, I have the setting below,

However, it is not capturing when people is clicking on the banner.

在此处输入图像描述

Below is what is showing on output variables on Google Tag Manager:

在此处输入图像描述

An Element is not a string, it's an object. Therefore, an Element doesn't typically 'contain'. Elements usually match CSS-selectors. So change the contain condition to the match CSS-selector one.

In the value of the Click Element the debugger shows you a very precise CSS selector for it rather than the value of the element. An Element object is usually quite large to show here. Also, the preview usually doesn't stringify objects to show the values. And not every object can be stringified anyway.

In your case, a CSS selector to match would be #ciaBannerHome where # indicates that "ciaBannerHome" is the id of the to-be-clicked element.

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