Skip to content

Commit

Permalink
change analytics to custom
Browse files Browse the repository at this point in the history
  • Loading branch information
yunjunz committed Jan 18, 2022
1 parent a4d3766 commit 1414420
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ social:

# Analytics
analytics:
provider : "google-universal" # false (default), "google", "google-universal", "custom"
provider : "custom" # false (default), "google", "google-universal", "custom"
google:
tracking_id : "UA-104225904-3"

Expand Down
10 changes: 9 additions & 1 deletion _includes/analytics-providers/custom.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<!-- start custom analytics snippet -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-104225904-3"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

<!-- end custom analytics snippet -->
gtag('config', 'UA-104225904-3');
</script>
<!-- end custom analytics snippet -->

0 comments on commit 1414420

Please sign in to comment.