Migrate from UA -> GA4

pull/7579/head
Kamran Ahmed 4 weeks ago
parent 687d3ee4da
commit f37ed9fab8
  1. 18
      src/components/Analytics/Analytics.astro

@ -2,16 +2,12 @@
---
<script src='./analytics.ts'></script>
<script async src='https://www.googletagmanager.com/gtag/js?id=UA-139582634-1'
></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-EZHDT2S2LF"></script>
<script is:inline>
// @ts-nocheck
window.dataLayer = window.dataLayer || [];
// @ts-nocheck
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-139582634-1');
</script>
gtag('config', 'G-EZHDT2S2LF');
</script>
Loading…
Cancel
Save