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>
window.dataLayer = window.dataLayer || ;
gtag('js', new Date());
Just wanted to share something that I did to get it to work.
In my dash app, I added the following lines:
@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 ?