Added Matomo Tracking code

This commit is contained in:
2019-01-18 23:21:55 -05:00
parent e788571242
commit 1c9c317282
3 changed files with 23 additions and 0 deletions
+4
View File
@@ -11,6 +11,10 @@ description:
url: "http://theme.digitaladapt.com"
baseurl: /
# Matomo Tracking
matomo_url: "//stats.digitaladapt.com/"
matomo_siteId: 2
# Excerpts
show_excerpts: true
excerpt_separator: <!--more-->
+4
View File
@@ -21,3 +21,7 @@
<meta name="msapplication-TileColor" content="#000000">
<meta name="theme-color" content="#ffffff">
<!-- End Icons -->
{%- if site.matomo_url -%}
{%- include matomo.html -%}
{%- endif -%}
+15
View File
@@ -0,0 +1,15 @@
<!-- Matomo -->
<script type="text/javascript">
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="{{ site.matomo_url }}";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '{{ site.matomo_siteId }}']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->