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

Merged
merged 1 commit into from
Jan 23, 2025
Merged

Fix Google Analytics script #825

merged 1 commit into from
Jan 23, 2025

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
Copy link
Member Author

@jekyllbot: merge +fix

@jekyllbot jekyllbot merged commit a9ef7b2 into jekyll:master Jan 23, 2025
3 checks passed
jekyllbot added a commit that referenced this pull request Jan 23, 2025
@ashmaroli ashmaroli deleted the update-ga branch January 23, 2025 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants