Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Google Analytics script #825

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ashmaroli
Copy link
Member

Context

Adapted from patch #824 for 2.5-stable branch by @iTiamo

Reference

#816 (comment) :

creating a file called google-analytics in my local directory _includes with the snippet that was provided to me...

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

 gtag('config', '{{ site.google_analytics }}');
</script>

This caused data to start flowing into my Google Analytics instance.

Co-authored by: Tiamo Idzenga <[email protected]>
@ashmaroli ashmaroli mentioned this pull request Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant