Skip to content

Commit

Permalink
add analytics following academicpages#265
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-swift committed Dec 14, 2023
1 parent f9864a5 commit ed17aef
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
10 changes: 7 additions & 3 deletions _includes/analytics-providers/custom.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!-- start custom analytics snippet -->

<!-- end custom analytics snippet -->
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-WD2MJZN8');</script>
<!-- End Google Tag Manager -->
1 change: 0 additions & 1 deletion _includes/scripts.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<script src="{{ base_path }}/assets/js/main.min.js"></script>

{% include analytics.html %}
{% include /comments-providers/scripts.html %}
6 changes: 5 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@
<!doctype html>
<html lang="{{ site.locale | slice: 0,2 }}" class="no-js">
<head>
{% include analytics.html %}
{% include head.html %}
{% include head/custom.html %}
</head>

<body>

<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WD2MJZN8"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
{% include browser-upgrade.html %}
{% include masthead.html %}

Expand Down

0 comments on commit ed17aef

Please sign in to comment.