fightforthefuture / earth-day-live

Source code for the Earth Day Live Website.
https://www.earthdaylive2020.org/
MIT License
0 stars 0 forks source link

Add Google Analytics tracking to the website #2

Closed dtoakley closed 4 years ago

dtoakley commented 4 years ago

As a campaign team we want Google Analytics tracking set up so that we can understand how the site is performing.

A/C:

Out of scope:

dtoakley commented 4 years ago

Here is the GA tracking script:


<script async src="https://www.googletagmanager.com/gtag/js?id=UA-162257314-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-162257314-1');
</script>```
alexperson-tw commented 4 years ago

Here's a link to the Nuxt documentation I used to set up GA for Earth Day Live that currently allows us to track page views: https://nuxtjs.org/faq/google-analytics/

From what I can tell from the GA dashboard, it seems to be working.

Screen Shot 2020-04-02 at 9 57 57 AM