我已经在Google Analytics(分析)中注册了我的网站,并且已将脚本放入这样的默认索引中:
<html>
<head>
<meta name="google-site-verification" content="****************" />
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-7**4*7***"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'AW-7**4*7***');
</script>
</head>
<body>
...
<a class="" href="/Contents/Make-App">
<div class="text">Make app</div>
</a>
...
<script src="/Content/assets/script/combined.min.js" type="text/javascript"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-*4**0**6-*"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-*4**0**6-*');
</script>
</body>
</html>
[如果我单击“制作应用”按钮,我想在Google Analytics(分析)中列出它。所以我可以看到有多少人点击了该按钮
我该怎么办?
您需要通过Google跟踪代码管理器控制台配置事件。这篇文章可能会有所帮助。 https://www.lovesdata.com/blog/google-tag-manager-button-click-tracking