Pass dynamic event label in Google AMP analytics event tracking

笑着哭i 提交于 2019-12-06 04:45:07

I think what you are asking for was recently made available here.

basically, you can use code like

<span id="test1" class="box" data-vars-event-label="22"> Click here </span>

and then use the value in the configuration as ${eventLabel}

It seems this is possible. AMP is now supported by Google Analytics as an extended component.

Events are user interactions with content that can be tracked independently from a web page or a screen load. Event tracking with clicked links can now be monitored like:

..,
"trackAnchorClicks": {
"on": "click",
"selector": "a",
"request": "event",
"vars": {
"eventId": "42",
"eventLabel": "clicked on a link"
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!