Skip to content

Commit 59799f4

Browse files
adriaandotcomAdriaan
authored andcommitted
Add collect-dnt to collect DNT visits
1 parent aee4926 commit 59799f4

30 files changed

+47
-43
lines changed

dist/latest/cloudflare.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Simple Analytics - Privacy friendly analytics (docs.simpleanalytics.com/script; 2021-04-20; 9833) */
1+
/* Simple Analytics - Privacy friendly analytics (docs.simpleanalytics.com/script; 2021-04-20; e8aa) */
22
/* eslint-env browser */
33

44
(function (window, overwriteOptions, baseUrl, apiUrlPrefix, version, saGlobal) {
@@ -42,6 +42,7 @@
4242
var Height = "Height";
4343
var Width = "Width";
4444
var scroll = "scroll";
45+
var trueText = "true";
4546
var uaData = nav.userAgentData;
4647
var scrollHeight = scroll + Height;
4748
var offsetHeight = "offset" + Height;
@@ -273,8 +274,9 @@
273274
// Should we record Do Not Track visits?
274275
var collectDnt = isBoolean(overwriteOptions.collectDnt)
275276
? overwriteOptions.collectDnt
276-
: attr(scriptElement, "ignore-dnt") == "true" ||
277-
attr(scriptElement, "skip-dnt") == "true";
277+
: attr(scriptElement, "ignore-dnt") == trueText ||
278+
attr(scriptElement, "skip-dnt") == trueText ||
279+
attr(scriptElement, "collect-dnt") == trueText;
278280

279281
// Customers can overwrite their hostname, here we check for that
280282
var definedHostname =

dist/latest/custom/app.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/latest/custom/app.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)