我有一个 gtag.js,其中包含我的跟踪代码。
谷歌说要将此添加到我的顶部,请问我如何为我的仪表板应用程序点他的?
我尝试将其添加为 /assets 下的 gtag.js 但没有成功
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-*****-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-******-1');
</script>
Run Code Online (Sandbox Code Playgroud)