Added Matomo Tracking code
This commit is contained in:
@@ -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-->
|
||||
|
||||
@@ -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 -%}
|
||||
|
||||
@@ -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 -->
|
||||
Reference in New Issue
Block a user