Impactworkers / iw-complaint-manager

Impactworkers Complaint Manager
1 stars 0 forks source link

Setup Google Analytics #73

Open mariliasoaresTW opened 5 months ago

mariliasoaresTW commented 5 months ago

To do: Install this to activate the Google Tag in QA and PROD: Copy and paste it in the code of every page of your website, immediately after the element. Don’t add more than one Google tag to each page. Note that each code snipped has a different tag id, which needs to be different for devs versus prod environments.

DEV/ CI/ QA / Staging:

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

  gtag('config', 'G-RJH986LDPZ');
</script>

PROD:

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

  gtag('config', 'G-0WM2H9E90C');
</script>

dev: https://iwcm-dev-4aa83826f5da.herokuapp.com/ QA: https://iwcm-qa-a6cabebb7030.herokuapp.com/ staging: https://iwcm-staging-ee074b21860b.herokuapp.com/ prod: https://iwcm-prod-8218f2ed8777.herokuapp.com/

Note This can be validated by accessing Google Analytics, please work with @mariliasoaresTW to see it working