Skip to content

Commit

Permalink
feat: 🎸 add ga script
Browse files Browse the repository at this point in the history
  • Loading branch information
hiracky16 committed Jan 17, 2025
1 parent f367770 commit 84f227d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions _includes/head-custom-google-analytics.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% if site.google_analytics %}
<!-- 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>
{% endif %}
3 changes: 2 additions & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
theme: jekyll-theme-architect
theme: jekyll-theme-architect
google_analytics: G-QF11N94K7Z

0 comments on commit 84f227d

Please sign in to comment.