Skip to content

Commit

Permalink
Update analytics.html
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaussion authored Aug 8, 2024
1 parent 41b653d commit 7537554
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions _includes/analytics.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
{% if site.g-analytics %}
<!-- Asynchronous Google Analytics snippet -->
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.g-analytics }}"></script>
<script>
var _gaq = _gaq || [];
var pluginUrl =
'//www.google-analytics.com/plugins/ga/inpage_linkid.js';
_gaq.push(['_require', 'inpage_linkid', pluginUrl]);
_gaq.push(['_setAccount', '{{ site.g-analytics }}']);
_gaq.push(['_trackPageview']);
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
gtag('config', '{{ site.g-analytics }}');
</script>
{% endif %}

0 comments on commit 7537554

Please sign in to comment.