Skip to content

Commit

Permalink
[Matomo] Flag for client side DNT feature - defaults to true
Browse files Browse the repository at this point in the history
  • Loading branch information
Daneo Van Overloop committed May 26, 2018
1 parent d5618e7 commit 3fe0c07
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions layouts/partials/matomo.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{{ $siteId := cond (isset .Site.Params "matomositeid") .Site.Params.MatomoSiteId "1" }}
{{ $clientSideDNT := cond (isset .Site.Params "matomoclientsidednt") .Site.Params.MatomoClientSideDNT true }}
<script type="text/javascript">
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
{{ if .Site.Params.MatomoDomainPrefixed }}_paq.push(["setDocumentTitle", document.domain + "/" + document.title]); {{ end }}
{{ if $clientSideDNT}} _paq.push(["setDoNotTrack", true]); {{ end }}
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
Expand Down

0 comments on commit 3fe0c07

Please sign in to comment.