GA GTM

1 链接跳转等待ga事件完成
@ datalayer 配置
[cc lang=”js”]
window.datalayer.push({
event: ‘orderGenerated’,
eventCallback: callback,
eventTimeout: 1000
})
[/cc]
@ gtm 点击触发条件设置
@ ga 代码里设置回调
[cc lang=”js”]ga(‘send’, ‘event’, {
eventCategory: ‘Outbound Link’,
eventAction: ‘click’,
eventLabel: event.target.href,
transport: ‘beacon’ //解决此问题的一种方式是将 transport 字段设置为 beacon
});[/cc]

Leave a Reply

Your email address will not be published. Required fields are marked *