Skip to content

Commit

Permalink
Fixed google analytics as per issue academicpages#265-academic pages
Browse files Browse the repository at this point in the history
  • Loading branch information
manideepabc committed Sep 5, 2022
1 parent 9e56493 commit 13ddd45
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 2 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,9 @@ social:

# Analytics
analytics:
provider : "google" # false (default), "google", "google-universal", "custom", "goatcounter"
provider : "custom" # false (default), "google", "google-universal", "custom", "goatcounter"
google:
tracking_id : G-D2VVPD3Y2T
goatcounter:
code :
tracking_id : "G-D2VVPD3Y2T"


# Site Author
Expand Down
10 changes: 10 additions & 0 deletions _includes/analytics-providers/custom.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<!-- start custom analytics snippet -->

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

gtag('config', 'G-D2VVPD3Y2T');
</script>

<!-- end custom analytics snippet -->

0 comments on commit 13ddd45

Please sign in to comment.