Skip to content

Commit

Permalink
remove support for honoring 'Do Not Track' browser header as per MDN …
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyvankooten committed Oct 16, 2023
1 parent d11c808 commit 6890f3c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
5 changes: 1 addition & 4 deletions assets/src/js/script.js
Expand Up @@ -29,12 +29,9 @@ function request(url, cb) {
}

function trackPageview (postId) {
let {dnt, use_cookie, cookie_path} = win[ka]
let {use_cookie, cookie_path} = win[ka]

if (
// do not track if "Do Not Track" is enabled
(nav.doNotTrack == 1 && dnt) ||

// do not track if this is a prerender request
(doc.visibilityState == 'prerender') ||

Expand Down
3 changes: 0 additions & 3 deletions code-snippets/ignore-do-not-track-browser-setting.php

This file was deleted.

3 changes: 0 additions & 3 deletions src/class-script-loader.php
Expand Up @@ -112,9 +112,6 @@ public function print_js_object()

// path to store the cookie in (will be subdirectory if website root is in subdirectory)
'cookie_path' => $this->get_cookie_path(),

// whether to honor DoNotTrack
'dnt' => apply_filters('koko_analytics_honor_dnt', true),
);
echo '<script>window.koko_analytics = ', json_encode($script_config), ';</script>';
}
Expand Down

0 comments on commit 6890f3c

Please sign in to comment.