@adobe/helix-rum-enhancer
Advanced tools
Comparing version 2.9.0 to 2.10.0
@@ -0,1 +1,8 @@ | ||
# [2.10.0](https://github.com/adobe/helix-rum-enhancer/compare/v2.9.0...v2.10.0) (2024-05-31) | ||
### Features | ||
* **index:** add new feature flag system ([7ef9f20](https://github.com/adobe/helix-rum-enhancer/commit/7ef9f20cd9e3ec07ac06c3924fb4ca33f68a49e1)) | ||
# [2.9.0](https://github.com/adobe/helix-rum-enhancer/compare/v2.8.0...v2.9.0) (2024-05-24) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "@adobe/helix-rum-enhancer", | ||
"version": "2.9.0", | ||
"version": "2.10.0", | ||
"description": "Helix RUM Enhancer", | ||
@@ -44,3 +44,3 @@ "main": "src/index.js", | ||
"junit-report-builder": "3.2.1", | ||
"lint-staged": "15.2.2", | ||
"lint-staged": "15.2.5", | ||
"mocha": "10.4.0", | ||
@@ -47,0 +47,0 @@ "mocha-multi-reporters": "1.5.1", |
@@ -17,2 +17,11 @@ /* | ||
const fflags = { | ||
has: (flag) => this[flag].indexOf(Array.from(window.origin) | ||
.map((a) => a.charCodeAt(0)) | ||
.reduce((a, b) => a + b, 1) % 1371) !== -1, | ||
enabled: (flag, callback) => this.has(flag) && callback(), | ||
disabled: (flag, callback) => !this.has(flag) && callback(), | ||
onetrust: [543, 770, 1136], | ||
}; | ||
const urlSanitizers = { | ||
@@ -91,5 +100,3 @@ full: () => window.location.href, | ||
// eslint-disable-next-line max-len | ||
if ([770, 1136].includes(Array.from(window.origin).map((a) => a.charCodeAt(0)).reduce((a, b) => a + b, 1) % 1371)) { | ||
return DEFAULT_TRACKING_EVENTS.concat('consent'); | ||
} | ||
fflags.enabled('onetrust', () => DEFAULT_TRACKING_EVENTS.push('consent')); | ||
return DEFAULT_TRACKING_EVENTS; | ||
@@ -96,0 +103,0 @@ } |
52084
403