【发布时间】:2019-09-25 02:12:28
【问题描述】:
我已经在谷歌分析中注册了我的网站,并将脚本放在我的默认索引中,如下所示:
<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 中列出。所以我可以看到有多少人点击了那个按钮
我该怎么做?
【问题讨论】:
标签: javascript jquery google-analytics onclick tags