HandsOnDataViz/leaflet-storymaps-with-google-sheets

add Google Analytics option

JackDougherty opened this issue · 1 comments

in the Options, consider adding a box for author to enter their Google Analytics tracking ID (such as UA-5488840-29)

and add the tracking code to the index.html page

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-5488840-29"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-5488840-29');
</script>

Added!