The tracking code given by Google Analytics looks like this :
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-131327483-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-131327483-1');
</script>
Just wanted to share something that I did to get it to work.
In my dash app, I added the following lines:
This is a slightly off-topic, but does concern analytics tracking within the apps. Iâve filed a request to have a Mixpanel package specific to Plotly here:
Looks like it got taken up and put into discussion!
@lppier@skywalka I am trying to add google analytics to my website. I am looking for some guidance on the community forum. I wanted to ask as to why it is necessary to set app.scripts.config.serve_locally to False ? Is it because Dash only allows either external or local scripts. In other words, you canât mix the two ? For example, I canât have the async script on the url supplied by google and the gtag script in my local folder ? Either external or local - is that the case ?