@adobe/spacecat-shared-rum-api-client 2.25.0 → 2.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/common/constants.js +0 -92
- package/src/common/page.js +4 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-rum-api-client-v2.25.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.25.0...@adobe/spacecat-shared-rum-api-client-v2.25.1) (2025-05-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* use rum bundler for consent classification ([#744](https://github.com/adobe/spacecat-shared/issues/744)) ([251ca76](https://github.com/adobe/spacecat-shared/commit/251ca76ec65c3775fdc1656143cfd1767bfb9b1c))
|
|
7
|
+
|
|
1
8
|
# [@adobe/spacecat-shared-rum-api-client-v2.25.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-rum-api-client-v2.24.3...@adobe/spacecat-shared-rum-api-client-v2.25.0) (2025-05-16)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/common/constants.js
CHANGED
|
@@ -14,95 +14,3 @@ export const GRANULARITY = {
|
|
|
14
14
|
HOURLY: 'HOURLY',
|
|
15
15
|
DAILY: 'DAILY',
|
|
16
16
|
};
|
|
17
|
-
|
|
18
|
-
export const COOKIE_CONSENT_SELECTORS = [
|
|
19
|
-
// OneTrust
|
|
20
|
-
'onetrust',
|
|
21
|
-
'.onetrust-banner',
|
|
22
|
-
'#onetrust-consent-sdk',
|
|
23
|
-
'#onetrust-banner-sdk',
|
|
24
|
-
'#ot-sdk-cookie-policy',
|
|
25
|
-
'.ot-sdk-container',
|
|
26
|
-
'.ot-sdk-row',
|
|
27
|
-
'.ot-sdk-column',
|
|
28
|
-
'.ot-sdk-show-settings',
|
|
29
|
-
'#ot-',
|
|
30
|
-
'.ot-',
|
|
31
|
-
|
|
32
|
-
// Cookiebot / Usercentrics
|
|
33
|
-
'#CybotCookiebotDialog',
|
|
34
|
-
'.CybotCookiebotDialog',
|
|
35
|
-
'#CookiebotWidget',
|
|
36
|
-
'.CookiebotWidget',
|
|
37
|
-
'.cookie-consent__banner',
|
|
38
|
-
'.cookie-consent__dialog',
|
|
39
|
-
'.cookie-consent__button',
|
|
40
|
-
|
|
41
|
-
// TrustArc
|
|
42
|
-
'truste-',
|
|
43
|
-
'#truste-',
|
|
44
|
-
'#truste-consent-banner',
|
|
45
|
-
'.truste-consent-banner',
|
|
46
|
-
'#truste-consent-button',
|
|
47
|
-
'.truste-consent-button',
|
|
48
|
-
'.truste-consent-text',
|
|
49
|
-
'.truste-consent-close',
|
|
50
|
-
|
|
51
|
-
// CookieYes
|
|
52
|
-
'#cookieyes-banner',
|
|
53
|
-
'.cky-consent',
|
|
54
|
-
'.cky-banner',
|
|
55
|
-
'.cky-btn',
|
|
56
|
-
'.cky-btn-accept',
|
|
57
|
-
'.cky-btn-reject',
|
|
58
|
-
'.cky-btn-settings',
|
|
59
|
-
|
|
60
|
-
// Termly
|
|
61
|
-
'#termly-consent-banner',
|
|
62
|
-
'.termly-consent-banner',
|
|
63
|
-
'.termly-consent-button',
|
|
64
|
-
'.termly-consent-text',
|
|
65
|
-
'.termly-consent-close',
|
|
66
|
-
|
|
67
|
-
// CookieScript
|
|
68
|
-
'#cookiescript_injected',
|
|
69
|
-
'.cookiescript-consent',
|
|
70
|
-
'.cookiescript-banner',
|
|
71
|
-
'.cookiescript-btn',
|
|
72
|
-
'.cookiescript-btn-accept',
|
|
73
|
-
'.cookiescript-btn-reject',
|
|
74
|
-
'.cookiescript-btn-settings',
|
|
75
|
-
|
|
76
|
-
// CookieFirst
|
|
77
|
-
'#cookiefirst-root',
|
|
78
|
-
'.cookiefirst-banner',
|
|
79
|
-
'.cookiefirst-button',
|
|
80
|
-
'.cookiefirst-text',
|
|
81
|
-
'.cookiefirst-close',
|
|
82
|
-
|
|
83
|
-
// Quantcast Choice
|
|
84
|
-
'#qc-cmp2-ui',
|
|
85
|
-
'.qc-cmp2-ui',
|
|
86
|
-
'.qc-cmp2-summary',
|
|
87
|
-
'.qc-cmp2-footer',
|
|
88
|
-
'.qc-cmp2-header',
|
|
89
|
-
'.qc-cmp2-buttons',
|
|
90
|
-
'.qc-cmp2-button',
|
|
91
|
-
'.qc-cmp2-button-accept',
|
|
92
|
-
'.qc-cmp2-button-reject',
|
|
93
|
-
|
|
94
|
-
// Crownpeak (Evidon)
|
|
95
|
-
'#evidon-banner',
|
|
96
|
-
'.evidon-banner',
|
|
97
|
-
'.evidon-button',
|
|
98
|
-
'.evidon-text',
|
|
99
|
-
'.evidon-close',
|
|
100
|
-
|
|
101
|
-
// Popupsmart
|
|
102
|
-
'#popupsmart-consent',
|
|
103
|
-
'.popupsmart-consent',
|
|
104
|
-
'.popupsmart-banner',
|
|
105
|
-
'.popupsmart-button',
|
|
106
|
-
'.popupsmart-text',
|
|
107
|
-
'.popupsmart-close',
|
|
108
|
-
];
|
package/src/common/page.js
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { hasText, isNonEmptyObject } from '@adobe/spacecat-shared-utils';
|
|
14
|
-
import
|
|
13
|
+
import { hasText, isNonEmptyObject, isString } from '@adobe/spacecat-shared-utils';
|
|
14
|
+
import classifyConsent from '@adobe/rum-distiller/consent.js';
|
|
15
15
|
|
|
16
16
|
const uncategorized = 'uncategorized';
|
|
17
17
|
|
|
@@ -39,10 +39,6 @@ export function getPageType(bundle, pageTypes) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export function isConsentClick(source) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const sourceLower = source.toLowerCase();
|
|
47
|
-
return COOKIE_CONSENT_SELECTORS.some((keyword) => sourceLower.includes(keyword.toLowerCase()));
|
|
42
|
+
const consent = isString(source) ? classifyConsent(source?.toLocaleLowerCase()) : undefined;
|
|
43
|
+
return !(consent === undefined);
|
|
48
44
|
}
|