EDRN / labcas-ui

User Interface for the Laboratory Catalog and Archive Service (LabCAS)
Apache License 2.0
0 stars 0 forks source link

Add Google Analytics to LabCAS UI for NIST #188

Open nutjob4life opened 5 months ago

nutjob4life commented 5 months ago

🤔 Tell Us About the Feature

On 2024-02-12, @yuliujpl asked for a Google Analytics code to be added to the LabCAS UI for NIST. After some back-and-forth about who should own the code, @nutjob4life created one on 2024-02-28.

The code should be applied to the LabCAS UI for NIST.

🎇 What Solution You'd Like

Insert this code into the <head> for LabCAS UI for NIST:

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

  gtag('config', 'G-X0YH110WES');
</script>
yuliujpl commented 5 months ago

I have this javascript dynamically generated via the templates.html, should I switch it to statically in each of the html page?

nutjob4life commented 5 months ago

@yuliujpl Google Analytics confirms "Receiving traffic in the past 48 hours" so I think it's fine.

Is there a commit we can link to close this issue?