对这个社区来说是全新的(请不要石头),并且研究和尝试都没有成功。
我试图通过谷歌分析跟踪点击出站链接的访客。出站链接是‘坐’(请原谅我的法语)在一个div中,我尽了最大努力应用现有的资源,不幸的是没有用,什么都没有被跟踪。如果你能帮我排查故障,那就太棒了。如果你想知道,我对编码/html(目前)几乎一无所知。这是当前的代码:
<div class="webinarjam-calltocation">
<div class="avia-button-wrap avia-button-left avia-builder-el-6
el_after_av_heading el_before_av_textblock"><a class="inline_popup
avia-button avia-icon_select-no avia-color-green avia-size-x-large
avia-position-center call-to-action" href="#webinarjamlogin"
onlick="gaTrackEvent('eventCategory', 'eventAction',
'eventLabel');"><span class="avia_iconbox_title">>> Ja, bitte nimm mich
in die Gästeliste auf <<</span></a></div>
</div>发布于 2018-08-28 18:29:02
这可能会发生,因为在重定向发生之前,您的事件调用无法到达Google。您可以执行以下操作:
<script>
var track_outbound_link = function(url) {
ga('send', 'eventCategory', 'eventAction', 'eventLabel', url, {
'transport': 'beacon',
'hitCallback': function(){document.location = url;}
});
}
</script>
[...]
<a href="https://yourlink.example.com" onclick="trackOutboundLink('https://yourlink.example.com'); return false;">Link label</a>https://stackoverflow.com/questions/52055449
复制相似问题