Skip to content

Commit

Permalink
Override to new GA4
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneCurcuru committed Aug 30, 2023
1 parent da65ae1 commit 6df0d18
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions _includes/analytics.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{% if site.analytics.provider and page.analytics != false %}
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-8Y9L1VXCW0"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

{% case site.analytics.provider %}
{% when "google" %}
{% include /analytics-providers/google.html %}
{% when "google-universal" %}
{% include /analytics-providers/google-universal.html %}
{% when "custom" %}
{% include /analytics-providers/custom.html %}
{% endcase %}

gtag('config', 'G-8Y9L1VXCW0');
</script>
{% endif %}

0 comments on commit 6df0d18

Please sign in to comment.