Skip to content

Commit

Permalink
Merge pull request #564 from microsoft/samart/gpcHonoring
Browse files Browse the repository at this point in the history
stopping clarity from running if globalPrivacyControl is true
  • Loading branch information
ender336 authored Apr 1, 2024
2 parents 235b9b1 + 5b4c5bb commit f2dd534
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions packages/clarity-decode/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clarity-decode",
"version": "0.7.26",
"version": "0.7.27",
"description": "An analytics library that uses web page interactions to generate aggregated insights",
"author": "Microsoft Corp.",
"license": "MIT",
Expand All @@ -26,7 +26,7 @@
"url": "https://github.com/Microsoft/clarity/issues"
},
"dependencies": {
"clarity-js": "^0.7.26"
"clarity-js": "^0.7.27"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^24.0.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/clarity-devtools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clarity-devtools",
"version": "0.7.26",
"version": "0.7.27",
"private": true,
"description": "Adds Clarity debugging support to browser devtools",
"author": "Microsoft Corp.",
Expand All @@ -24,9 +24,9 @@
"url": "https://github.com/Microsoft/clarity/issues"
},
"dependencies": {
"clarity-decode": "^0.7.26",
"clarity-js": "^0.7.26",
"clarity-visualize": "^0.7.26"
"clarity-decode": "^0.7.27",
"clarity-js": "^0.7.27",
"clarity-visualize": "^0.7.27"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^15.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/clarity-devtools/static/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"manifest_version": 2,
"name": "Microsoft Clarity Developer Tools",
"description": "Clarity helps you understand how users are interacting with your website.",
"version": "0.7.26",
"version_name": "0.7.26",
"version": "0.7.27",
"version_name": "0.7.27",
"minimum_chrome_version": "50",
"devtools_page": "devtools.html",
"icons": {
Expand Down
2 changes: 1 addition & 1 deletion packages/clarity-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clarity-js",
"version": "0.7.26",
"version": "0.7.27",
"description": "An analytics library that uses web page interactions to generate aggregated insights",
"author": "Microsoft Corp.",
"license": "MIT",
Expand Down
4 changes: 3 additions & 1 deletion packages/clarity-js/src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ export function active(): boolean {

export function check(): boolean {
try {
let globalPrivacyControlSet = navigator && "globalPrivacyControl" in navigator && navigator['globalPrivacyControl'] == true;
return status === false &&
typeof Promise !== "undefined" &&
window["MutationObserver"] &&
document["createTreeWalker"] &&
"now" in Date &&
"now" in performance &&
typeof WeakMap !== "undefined";
typeof WeakMap !== "undefined" &&
!globalPrivacyControlSet
} catch (ex) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/clarity-js/src/core/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
let version = "0.7.26";
let version = "0.7.27";
export default version;
4 changes: 2 additions & 2 deletions packages/clarity-visualize/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clarity-visualize",
"version": "0.7.26",
"version": "0.7.27",
"description": "An analytics library that uses web page interactions to generate aggregated insights",
"author": "Microsoft Corp.",
"license": "MIT",
Expand All @@ -27,7 +27,7 @@
"url": "https://github.com/Microsoft/clarity/issues"
},
"dependencies": {
"clarity-decode": "^0.7.26"
"clarity-decode": "^0.7.27"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^24.0.0",
Expand Down

0 comments on commit f2dd534

Please sign in to comment.