Skip to content

Commit

Permalink
FEATURE: Add do_not_track and disableCookies settings (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
kees-closed authored Oct 4, 2022
1 parent bbd0dcb commit a488709
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions common/head_tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@
_paq.push(["setDomains", allDomains]);
}

if (settings.do_not_track) {
_paq.push(["setDoNotTrack", true]);
}

if (settings.disable_cookies) {
_paq.push(["disableCookies"]);
}

_paq.push(["setCustomUrl", url]);
_paq.push(["setDocumentTitle", title]);
_paq.push(["trackPageView"]);
Expand Down
8 changes: 8 additions & 0 deletions settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ subdomain_tracking:
type: bool
default: false
description: Track visitors across main domain & subdomains, assuming discourse is on a subdomain.
do_not_track:
type: bool
default: false
description: So tracking requests will not be sent if visitors do not wish to be tracked.
disable_cookies:
type: bool
default: false
description: Disables all first party cookies. Existing Matomo cookies for this website will be deleted on the next pageview.

0 comments on commit a488709

Please sign in to comment.