【发布时间】:2019-11-14 00:12:24
【问题描述】:
并提前感谢您的任何指导! 我为朋友的业务创建了一个基本的 HTML/CSS 网站,但现在他们团队中的某个人要求将此脚本添加到他们的网站以跟踪外部链接点击。
<script>
dataLayer.push({
'event': 'uaevent',
'ecommerce': 'undefined',
'eventCategory': 'outbound links',
'eventAction': 'select::url',
'eventLabel': '([link name] | [target-url])'
});
</script>
我对分析脚本的了解非常有限,而且我以前从未这样做过。
他们已请求此脚本“触发”他们网站上的链接。 (以下链接)
<a href="https://saloncentric.secure.force.com/candidateportal/FCMS__CMSLayout?
jobSite=All%20Brands&p=Candidate&page=JobListPage" target="_blank"><button
class="bannerbutton">VIEW ALL BRAND OPPORTUNITIES</button></a>
还有这个
<a href="https://saloncentric.secure.force.com/candidateportal/FCMS__CMSLayout?
jobSite=All%20Brands&p=Candidate&page=JobListPage" target="_blank"><div
class="calltoactionfooter">
<button class="footerbutton">CLICK HERE TO VIEW ALL BRAND OPPORTUNITIES</button>
</div> </a>
我尝试将“链接名称”(查看所有品牌..)和“target-url”(外部链接)添加到脚本并将其添加到头部,但我不认为这是正确的。任何帮助是极大的赞赏!
【问题讨论】:
标签: javascript events google-analytics google-tag-manager