【发布时间】:2020-04-19 13:35:40
【问题描述】:
我有一个 gtag.js,其中包含我的跟踪代码。
Google 说要将此添加到我的顶部,请问我如何为我的 dash 应用添加他的?
我尝试将其添加为 /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>
【问题讨论】:
标签: python google-analytics plotly-dash