@c15t/scripts 2.2.0 → 3.0.0-alpha.0
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/AGENTS.md +74 -48
- package/README.md +3 -3
- package/dist/e2e-test-utils.js +60 -24
- package/dist/engine/compile.js +45 -45
- package/dist/engine/runtime.js +119 -119
- package/dist/registry.js +186 -176
- package/dist/resolve.js +12 -12
- package/dist/vendors/_shared/attributes.js +5 -5
- package/dist/vendors/_shared/google-consent.js +10 -10
- package/dist/vendors/_shared/install-builders.js +9 -9
- package/dist/vendors/_shared/script-url.js +12 -12
- package/dist/vendors/ads-and-pixels/linkedin-insights.js +16 -16
- package/dist/vendors/ads-and-pixels/meta-pixel.js +82 -82
- package/dist/vendors/ads-and-pixels/microsoft-uet.js +57 -57
- package/dist/vendors/ads-and-pixels/openai-pixel.js +88 -0
- package/dist/vendors/ads-and-pixels/reddit-pixel.js +39 -39
- package/dist/vendors/ads-and-pixels/snapchat-pixel.js +25 -25
- package/dist/vendors/ads-and-pixels/tiktok-pixel.js +31 -31
- package/dist/vendors/ads-and-pixels/x-pixel.js +17 -17
- package/dist/vendors/analytics/adobe-analytics.js +17 -17
- package/dist/vendors/analytics/ahrefs-analytics.js +8 -8
- package/dist/vendors/analytics/amplitude.js +39 -39
- package/dist/vendors/analytics/clearbit.js +11 -11
- package/dist/vendors/analytics/cloudflare-web-analytics.js +13 -13
- package/dist/vendors/analytics/databuddy.js +45 -45
- package/dist/vendors/analytics/fathom-analytics.js +15 -15
- package/dist/vendors/analytics/google-tag.js +23 -23
- package/dist/vendors/analytics/heap.js +37 -37
- package/dist/vendors/analytics/hightouch.js +30 -30
- package/dist/vendors/analytics/hotjar.js +14 -14
- package/dist/vendors/analytics/logrocket.js +24 -24
- package/dist/vendors/analytics/matomo-analytics.js +51 -51
- package/dist/vendors/analytics/microsoft-clarity.js +31 -31
- package/dist/vendors/analytics/mixpanel-analytics.js +31 -31
- package/dist/vendors/analytics/pirsch.js +27 -27
- package/dist/vendors/analytics/plausible-analytics.js +24 -24
- package/dist/vendors/analytics/posthog.js +84 -79
- package/dist/vendors/analytics/promptwatch.js +8 -8
- package/dist/vendors/analytics/rudderstack.js +50 -50
- package/dist/vendors/analytics/rybbit-analytics.js +30 -30
- package/dist/vendors/analytics/segment.js +16 -16
- package/dist/vendors/analytics/umami-analytics.js +16 -16
- package/dist/vendors/analytics/vercel-analytics.js +22 -22
- package/dist/vendors/functional/crisp.js +49 -51
- package/dist/vendors/functional/intercom.js +18 -18
- package/dist/vendors/tag-managers/google-tag-manager.js +20 -20
- package/dist-types/__tests__/helpers.d.ts +10 -10
- package/dist-types/engine/compile.d.ts +2 -2
- package/dist-types/engine/runtime.d.ts +3 -3
- package/dist-types/registry.d.ts +182 -173
- package/dist-types/resolve.d.ts +2 -2
- package/dist-types/types.d.ts +2 -2
- package/dist-types/vendors/_shared/attributes.d.ts +2 -2
- package/dist-types/vendors/_shared/google-consent.d.ts +2 -2
- package/dist-types/vendors/_shared/install-builders.d.ts +1 -1
- package/dist-types/vendors/_shared/script-url.d.ts +6 -6
- package/dist-types/vendors/ads-and-pixels/linkedin-insights.d.ts +14 -14
- package/dist-types/vendors/ads-and-pixels/meta-pixel.d.ts +27 -27
- package/dist-types/vendors/ads-and-pixels/microsoft-uet.d.ts +40 -40
- package/dist-types/vendors/ads-and-pixels/openai-pixel.d.ts +211 -0
- package/dist-types/vendors/ads-and-pixels/reddit-pixel.d.ts +28 -29
- package/dist-types/vendors/ads-and-pixels/snapchat-pixel.d.ts +23 -23
- package/dist-types/vendors/ads-and-pixels/tiktok-pixel.d.ts +22 -22
- package/dist-types/vendors/ads-and-pixels/x-pixel.d.ts +15 -15
- package/dist-types/vendors/analytics/adobe-analytics.d.ts +3 -3
- package/dist-types/vendors/analytics/ahrefs-analytics.d.ts +5 -5
- package/dist-types/vendors/analytics/amplitude.d.ts +24 -24
- package/dist-types/vendors/analytics/clearbit.d.ts +5 -5
- package/dist-types/vendors/analytics/cloudflare-web-analytics.d.ts +6 -6
- package/dist-types/vendors/analytics/databuddy.d.ts +34 -31
- package/dist-types/vendors/analytics/fathom-analytics.d.ts +8 -8
- package/dist-types/vendors/analytics/google-tag.d.ts +17 -17
- package/dist-types/vendors/analytics/heap.d.ts +17 -17
- package/dist-types/vendors/analytics/hightouch.d.ts +15 -15
- package/dist-types/vendors/analytics/hotjar.d.ts +9 -9
- package/dist-types/vendors/analytics/logrocket.d.ts +11 -11
- package/dist-types/vendors/analytics/matomo-analytics.d.ts +3 -3
- package/dist-types/vendors/analytics/microsoft-clarity.d.ts +12 -13
- package/dist-types/vendors/analytics/mixpanel-analytics.d.ts +20 -20
- package/dist-types/vendors/analytics/pirsch.d.ts +10 -10
- package/dist-types/vendors/analytics/plausible-analytics.d.ts +13 -13
- package/dist-types/vendors/analytics/posthog.d.ts +35 -32
- package/dist-types/vendors/analytics/promptwatch.d.ts +5 -5
- package/dist-types/vendors/analytics/rudderstack.d.ts +16 -16
- package/dist-types/vendors/analytics/rybbit-analytics.d.ts +15 -15
- package/dist-types/vendors/analytics/segment.d.ts +11 -11
- package/dist-types/vendors/analytics/umami-analytics.d.ts +9 -9
- package/dist-types/vendors/analytics/vercel-analytics.d.ts +13 -13
- package/dist-types/vendors/functional/crisp.d.ts +9 -9
- package/dist-types/vendors/functional/intercom.d.ts +12 -12
- package/dist-types/vendors/tag-managers/google-tag-manager.d.ts +16 -16
- package/docs/README.md +74 -48
- package/docs/assets/v3/brand-bar.png +0 -0
- package/docs/assets/v3/brand-card.png +0 -0
- package/docs/assets/v3/choice-wall.png +0 -0
- package/docs/assets/v3/mobile-card.png +0 -0
- package/docs/assets/v3/preferences.png +0 -0
- package/docs/customization/overview.md +45 -0
- package/docs/customization/recipes.md +79 -0
- package/docs/customization/slots.md +55 -0
- package/docs/customization/tokens.md +76 -0
- package/docs/customization/translations.md +49 -0
- package/docs/frameworks/javascript/script-loader.md +30 -339
- package/docs/frameworks/next/script-loader.md +134 -467
- package/docs/frameworks/react/script-loader.md +35 -535
- package/docs/guides/consent-state.md +60 -0
- package/docs/guides/data-fetching.md +163 -0
- package/docs/guides/deployment-modes.md +63 -0
- package/docs/guides/troubleshooting.md +68 -0
- package/docs/guides/verify-consent.md +62 -0
- package/docs/integrations/adobe-analytics.md +239 -105
- package/docs/integrations/ahrefs-analytics.md +238 -104
- package/docs/integrations/amplitude.md +219 -157
- package/docs/integrations/building-integrations.md +32 -224
- package/docs/integrations/clearbit.md +247 -86
- package/docs/integrations/cloudflare-web-analytics.md +250 -84
- package/docs/integrations/crisp.md +251 -97
- package/docs/integrations/databuddy.md +259 -153
- package/docs/integrations/fathom-analytics.md +239 -96
- package/docs/integrations/google-maps.md +328 -207
- package/docs/integrations/google-tag-manager.md +248 -96
- package/docs/integrations/google-tag.md +261 -90
- package/docs/integrations/heap.md +222 -149
- package/docs/integrations/hightouch.md +225 -131
- package/docs/integrations/hotjar.md +239 -90
- package/docs/integrations/intercom.md +239 -98
- package/docs/integrations/linkedin-insights.md +243 -113
- package/docs/integrations/logrocket.md +241 -123
- package/docs/integrations/matomo-analytics.md +256 -111
- package/docs/integrations/meta-pixel.md +197 -324
- package/docs/integrations/microsoft-clarity.md +233 -114
- package/docs/integrations/microsoft-uet.md +245 -110
- package/docs/integrations/mixpanel-analytics.md +252 -87
- package/docs/integrations/openai-pixel.md +441 -0
- package/docs/integrations/overview.md +95 -133
- package/docs/integrations/pirsch.md +249 -96
- package/docs/integrations/plausible-analytics.md +241 -100
- package/docs/integrations/posthog.md +353 -214
- package/docs/integrations/promptwatch.md +251 -81
- package/docs/integrations/reddit-pixel.md +226 -173
- package/docs/integrations/rudderstack.md +244 -187
- package/docs/integrations/rybbit-analytics.md +244 -91
- package/docs/integrations/segment.md +238 -92
- package/docs/integrations/snapchat-pixel.md +240 -110
- package/docs/integrations/tiktok-pixel.md +249 -81
- package/docs/integrations/umami-analytics.md +242 -95
- package/docs/integrations/vercel-analytics.md +242 -90
- package/docs/integrations/x-pixel.md +238 -104
- package/docs/integrations/youtube.md +354 -142
- package/docs/upgrade-v3.md +334 -0
- package/package.json +85 -78
- package/readme.json +2 -2
- package/dist/e2e-test-utils.cjs +0 -166
- package/dist/engine/compile.cjs +0 -130
- package/dist/engine/runtime.cjs +0 -475
- package/dist/registry.cjs +0 -423
- package/dist/resolve.cjs +0 -71
- package/dist/types.cjs +0 -69
- package/dist/vendors/_shared/attributes.cjs +0 -55
- package/dist/vendors/_shared/google-consent.cjs +0 -69
- package/dist/vendors/_shared/install-builders.cjs +0 -59
- package/dist/vendors/_shared/script-url.cjs +0 -78
- package/dist/vendors/ads-and-pixels/linkedin-insights.cjs +0 -89
- package/dist/vendors/ads-and-pixels/meta-pixel.cjs +0 -206
- package/dist/vendors/ads-and-pixels/microsoft-uet.cjs +0 -151
- package/dist/vendors/ads-and-pixels/reddit-pixel.cjs +0 -151
- package/dist/vendors/ads-and-pixels/snapchat-pixel.cjs +0 -131
- package/dist/vendors/ads-and-pixels/tiktok-pixel.cjs +0 -130
- package/dist/vendors/ads-and-pixels/x-pixel.cjs +0 -92
- package/dist/vendors/analytics/adobe-analytics.cjs +0 -90
- package/dist/vendors/analytics/ahrefs-analytics.cjs +0 -68
- package/dist/vendors/analytics/amplitude.cjs +0 -193
- package/dist/vendors/analytics/clearbit.cjs +0 -69
- package/dist/vendors/analytics/cloudflare-web-analytics.cjs +0 -73
- package/dist/vendors/analytics/databuddy.cjs +0 -144
- package/dist/vendors/analytics/fathom-analytics.cjs +0 -76
- package/dist/vendors/analytics/google-tag.cjs +0 -107
- package/dist/vendors/analytics/heap.cjs +0 -181
- package/dist/vendors/analytics/hightouch.cjs +0 -153
- package/dist/vendors/analytics/hotjar.cjs +0 -85
- package/dist/vendors/analytics/logrocket.cjs +0 -99
- package/dist/vendors/analytics/matomo-analytics.cjs +0 -232
- package/dist/vendors/analytics/microsoft-clarity.cjs +0 -138
- package/dist/vendors/analytics/mixpanel-analytics.cjs +0 -134
- package/dist/vendors/analytics/pirsch.cjs +0 -108
- package/dist/vendors/analytics/plausible-analytics.cjs +0 -122
- package/dist/vendors/analytics/posthog.cjs +0 -236
- package/dist/vendors/analytics/promptwatch.cjs +0 -70
- package/dist/vendors/analytics/rudderstack.cjs +0 -227
- package/dist/vendors/analytics/rybbit-analytics.cjs +0 -104
- package/dist/vendors/analytics/segment.cjs +0 -97
- package/dist/vendors/analytics/umami-analytics.cjs +0 -80
- package/dist/vendors/analytics/vercel-analytics.cjs +0 -94
- package/dist/vendors/functional/crisp.cjs +0 -143
- package/dist/vendors/functional/intercom.cjs +0 -89
- package/dist/vendors/tag-managers/google-tag-manager.cjs +0 -100
- package/docs/shared/react/guides/script-loader.md +0 -311
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
-
var define = (defs, kind)=>{
|
|
6
|
-
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
[kind]: defs[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
define(getters, "get");
|
|
12
|
-
define(values, "value");
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
-
})();
|
|
18
|
-
(()=>{
|
|
19
|
-
__webpack_require__.r = (exports1)=>{
|
|
20
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
-
value: 'Module'
|
|
22
|
-
});
|
|
23
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
-
value: true
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
})();
|
|
28
|
-
var __webpack_exports__ = {};
|
|
29
|
-
__webpack_require__.r(__webpack_exports__);
|
|
30
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
-
matomoAnalytics: ()=>matomoAnalytics,
|
|
32
|
-
matomoAnalyticsManifest: ()=>matomoAnalyticsManifest
|
|
33
|
-
});
|
|
34
|
-
const external_resolve_cjs_namespaceObject = require("../../resolve.cjs");
|
|
35
|
-
const external_types_cjs_namespaceObject = require("../../types.cjs");
|
|
36
|
-
const script_url_cjs_namespaceObject = require("../_shared/script-url.cjs");
|
|
37
|
-
function stripProtocol(value) {
|
|
38
|
-
if (value.startsWith('https://')) return value.slice(8);
|
|
39
|
-
if (value.startsWith('http://')) return value.slice(7);
|
|
40
|
-
return value;
|
|
41
|
-
}
|
|
42
|
-
function resolveMatomoOrigin(options) {
|
|
43
|
-
if (options.matomoUrl) return (0, script_url_cjs_namespaceObject.stripTrailingSlashes)(options.matomoUrl);
|
|
44
|
-
if (options.cloudId) {
|
|
45
|
-
const cleanedCloudId = (0, script_url_cjs_namespaceObject.stripTrailingSlashes)(stripProtocol(options.cloudId));
|
|
46
|
-
if (cleanedCloudId.endsWith('.matomo.cloud')) return `https://${cleanedCloudId}`;
|
|
47
|
-
return `https://cdn.matomo.cloud/${cleanedCloudId}`;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function buildInstallSteps(options) {
|
|
51
|
-
const install = [
|
|
52
|
-
{
|
|
53
|
-
type: 'setGlobal',
|
|
54
|
-
name: '_paq',
|
|
55
|
-
value: [],
|
|
56
|
-
ifUndefined: true
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
type: 'pushToQueue',
|
|
60
|
-
queue: '_paq',
|
|
61
|
-
value: [
|
|
62
|
-
'setTrackerUrl',
|
|
63
|
-
'{{trackerUrl}}'
|
|
64
|
-
]
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
type: 'pushToQueue',
|
|
68
|
-
queue: '_paq',
|
|
69
|
-
value: [
|
|
70
|
-
'setSiteId',
|
|
71
|
-
'{{siteId}}'
|
|
72
|
-
]
|
|
73
|
-
}
|
|
74
|
-
];
|
|
75
|
-
if (options.enableLinkTracking) install.push({
|
|
76
|
-
type: 'pushToQueue',
|
|
77
|
-
queue: '_paq',
|
|
78
|
-
value: [
|
|
79
|
-
'enableLinkTracking'
|
|
80
|
-
]
|
|
81
|
-
});
|
|
82
|
-
if (options.disableCookies) install.push({
|
|
83
|
-
type: 'pushToQueue',
|
|
84
|
-
queue: '_paq',
|
|
85
|
-
value: [
|
|
86
|
-
'disableCookies'
|
|
87
|
-
]
|
|
88
|
-
});
|
|
89
|
-
if (options.enableConsentMode && !options.consentInitiallyGiven) install.push({
|
|
90
|
-
type: 'pushToQueue',
|
|
91
|
-
queue: '_paq',
|
|
92
|
-
value: [
|
|
93
|
-
'requireConsent'
|
|
94
|
-
]
|
|
95
|
-
});
|
|
96
|
-
if (options.enableConsentMode && options.consentInitiallyGiven) {
|
|
97
|
-
install.push({
|
|
98
|
-
type: 'pushToQueue',
|
|
99
|
-
queue: '_paq',
|
|
100
|
-
value: [
|
|
101
|
-
'setConsentGiven'
|
|
102
|
-
]
|
|
103
|
-
});
|
|
104
|
-
if (options.trackPageView) install.push({
|
|
105
|
-
type: 'pushToQueue',
|
|
106
|
-
queue: '_paq',
|
|
107
|
-
value: [
|
|
108
|
-
'trackPageView'
|
|
109
|
-
]
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
if (options.trackPageView && !options.enableConsentMode) install.push({
|
|
113
|
-
type: 'pushToQueue',
|
|
114
|
-
queue: '_paq',
|
|
115
|
-
value: [
|
|
116
|
-
'trackPageView'
|
|
117
|
-
]
|
|
118
|
-
});
|
|
119
|
-
install.push({
|
|
120
|
-
type: 'loadScript',
|
|
121
|
-
src: "{{scriptUrl}}",
|
|
122
|
-
async: true
|
|
123
|
-
});
|
|
124
|
-
return install;
|
|
125
|
-
}
|
|
126
|
-
function buildGrantedHooks(options) {
|
|
127
|
-
const onBeforeLoadGranted = [];
|
|
128
|
-
if (options.enableConsentMode && !options.consentInitiallyGiven) onBeforeLoadGranted.push({
|
|
129
|
-
type: 'pushToQueue',
|
|
130
|
-
queue: '_paq',
|
|
131
|
-
value: [
|
|
132
|
-
'setConsentGiven'
|
|
133
|
-
]
|
|
134
|
-
});
|
|
135
|
-
if (options.trackPageView && options.enableConsentMode && !options.consentInitiallyGiven) onBeforeLoadGranted.push({
|
|
136
|
-
type: 'pushToQueue',
|
|
137
|
-
queue: '_paq',
|
|
138
|
-
value: [
|
|
139
|
-
'trackPageView'
|
|
140
|
-
]
|
|
141
|
-
});
|
|
142
|
-
const onConsentGranted = [];
|
|
143
|
-
if (options.enableConsentMode) {
|
|
144
|
-
onConsentGranted.push({
|
|
145
|
-
type: 'pushToQueue',
|
|
146
|
-
queue: '_paq',
|
|
147
|
-
value: [
|
|
148
|
-
'setConsentGiven'
|
|
149
|
-
]
|
|
150
|
-
});
|
|
151
|
-
if (options.trackPageView) onConsentGranted.push({
|
|
152
|
-
type: 'pushToQueue',
|
|
153
|
-
queue: '_paq',
|
|
154
|
-
value: [
|
|
155
|
-
'trackPageView'
|
|
156
|
-
]
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
return {
|
|
160
|
-
onBeforeLoadGranted,
|
|
161
|
-
onConsentGranted
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
function buildDeniedHooks(options) {
|
|
165
|
-
const onConsentDenied = [];
|
|
166
|
-
if (options.enableConsentMode) onConsentDenied.push({
|
|
167
|
-
type: 'pushToQueue',
|
|
168
|
-
queue: '_paq',
|
|
169
|
-
value: [
|
|
170
|
-
'forgetConsentGiven'
|
|
171
|
-
]
|
|
172
|
-
});
|
|
173
|
-
return onConsentDenied;
|
|
174
|
-
}
|
|
175
|
-
function createMatomoAnalyticsManifest(options) {
|
|
176
|
-
const { onBeforeLoadGranted, onConsentGranted } = buildGrantedHooks(options);
|
|
177
|
-
let alwaysLoad;
|
|
178
|
-
let persistAfterConsentRevoked;
|
|
179
|
-
if (options.enableConsentMode) {
|
|
180
|
-
alwaysLoad = true;
|
|
181
|
-
persistAfterConsentRevoked = true;
|
|
182
|
-
}
|
|
183
|
-
return {
|
|
184
|
-
...external_types_cjs_namespaceObject.vendorManifestContract,
|
|
185
|
-
vendor: 'matomo-analytics',
|
|
186
|
-
category: 'measurement',
|
|
187
|
-
alwaysLoad,
|
|
188
|
-
persistAfterConsentRevoked,
|
|
189
|
-
install: buildInstallSteps(options),
|
|
190
|
-
onBeforeLoadGranted,
|
|
191
|
-
onConsentGranted,
|
|
192
|
-
onConsentDenied: buildDeniedHooks(options)
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
const matomoAnalyticsManifest = createMatomoAnalyticsManifest({
|
|
196
|
-
enableConsentMode: false,
|
|
197
|
-
consentInitiallyGiven: false,
|
|
198
|
-
enableLinkTracking: false,
|
|
199
|
-
disableCookies: false,
|
|
200
|
-
trackPageView: true
|
|
201
|
-
});
|
|
202
|
-
function matomoAnalytics(options = {}) {
|
|
203
|
-
const origin = resolveMatomoOrigin(options);
|
|
204
|
-
let trackerUrl = options.trackerUrl;
|
|
205
|
-
if (!trackerUrl && origin) trackerUrl = (0, script_url_cjs_namespaceObject.joinUrlPath)(origin, 'matomo.php');
|
|
206
|
-
let scriptUrl = options.scriptUrl;
|
|
207
|
-
if (!scriptUrl && origin) scriptUrl = (0, script_url_cjs_namespaceObject.joinUrlPath)(origin, 'matomo.js');
|
|
208
|
-
if (!trackerUrl || !scriptUrl) throw new Error("matomoAnalytics requires `matomoUrl`, `cloudId`, or explicit `trackerUrl` and `scriptUrl` values.");
|
|
209
|
-
const enableConsentMode = 'required' === options.defaultConsent || 'given' === options.defaultConsent;
|
|
210
|
-
const consentInitiallyGiven = 'given' === options.defaultConsent;
|
|
211
|
-
const manifest = createMatomoAnalyticsManifest({
|
|
212
|
-
enableConsentMode,
|
|
213
|
-
consentInitiallyGiven,
|
|
214
|
-
enableLinkTracking: options.enableLinkTracking ?? false,
|
|
215
|
-
disableCookies: options.disableCookies ?? false,
|
|
216
|
-
trackPageView: options.trackPageView ?? true
|
|
217
|
-
});
|
|
218
|
-
return (0, external_resolve_cjs_namespaceObject.resolveManifest)(manifest, {
|
|
219
|
-
siteId: String(options.siteId ?? 1),
|
|
220
|
-
trackerUrl,
|
|
221
|
-
scriptUrl
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
exports.matomoAnalytics = __webpack_exports__.matomoAnalytics;
|
|
225
|
-
exports.matomoAnalyticsManifest = __webpack_exports__.matomoAnalyticsManifest;
|
|
226
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
227
|
-
"matomoAnalytics",
|
|
228
|
-
"matomoAnalyticsManifest"
|
|
229
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
230
|
-
Object.defineProperty(exports, '__esModule', {
|
|
231
|
-
value: true
|
|
232
|
-
});
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
-
var define = (defs, kind)=>{
|
|
6
|
-
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
[kind]: defs[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
define(getters, "get");
|
|
12
|
-
define(values, "value");
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
-
})();
|
|
18
|
-
(()=>{
|
|
19
|
-
__webpack_require__.r = (exports1)=>{
|
|
20
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
-
value: 'Module'
|
|
22
|
-
});
|
|
23
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
-
value: true
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
})();
|
|
28
|
-
var __webpack_exports__ = {};
|
|
29
|
-
__webpack_require__.r(__webpack_exports__);
|
|
30
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
-
clarity: ()=>clarity,
|
|
32
|
-
clarityManifest: ()=>clarityManifest
|
|
33
|
-
});
|
|
34
|
-
const external_resolve_cjs_namespaceObject = require("../../resolve.cjs");
|
|
35
|
-
const external_types_cjs_namespaceObject = require("../../types.cjs");
|
|
36
|
-
function toClarityConsentState(value) {
|
|
37
|
-
if (true === value) return 'granted';
|
|
38
|
-
if (false === value) return 'denied';
|
|
39
|
-
if ('string' != typeof value) return;
|
|
40
|
-
const normalized = value.toLowerCase();
|
|
41
|
-
if ('granted' === normalized || 'true' === normalized) return 'granted';
|
|
42
|
-
if ('denied' === normalized || 'false' === normalized) return 'denied';
|
|
43
|
-
}
|
|
44
|
-
function getConsentValue(value, keys) {
|
|
45
|
-
for (const key of keys){
|
|
46
|
-
const consent = toClarityConsentState(value[key]);
|
|
47
|
-
if (consent) return consent;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function getConsentPayloadFromState(consents) {
|
|
51
|
-
let adStorage;
|
|
52
|
-
adStorage = consents.marketing ? 'granted' : 'denied';
|
|
53
|
-
let analyticsStorage;
|
|
54
|
-
analyticsStorage = consents.measurement ? 'granted' : 'denied';
|
|
55
|
-
return {
|
|
56
|
-
ad_Storage: adStorage,
|
|
57
|
-
analytics_Storage: analyticsStorage
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
function getClarityConsentPayload(consents, defaultConsent) {
|
|
61
|
-
const fallback = getConsentPayloadFromState(consents);
|
|
62
|
-
if (void 0 === defaultConsent) return fallback;
|
|
63
|
-
const booleanConsent = toClarityConsentState(defaultConsent);
|
|
64
|
-
if (booleanConsent) return {
|
|
65
|
-
ad_Storage: booleanConsent,
|
|
66
|
-
analytics_Storage: booleanConsent
|
|
67
|
-
};
|
|
68
|
-
if (null !== defaultConsent && 'object' == typeof defaultConsent) return {
|
|
69
|
-
ad_Storage: getConsentValue(defaultConsent, [
|
|
70
|
-
'ad_Storage',
|
|
71
|
-
'ad_storage',
|
|
72
|
-
'marketing'
|
|
73
|
-
]) ?? fallback.ad_Storage,
|
|
74
|
-
analytics_Storage: getConsentValue(defaultConsent, [
|
|
75
|
-
'analytics_Storage',
|
|
76
|
-
'analytics_storage',
|
|
77
|
-
'measurement',
|
|
78
|
-
'analytics'
|
|
79
|
-
]) ?? fallback.analytics_Storage
|
|
80
|
-
};
|
|
81
|
-
return fallback;
|
|
82
|
-
}
|
|
83
|
-
function syncClarityConsent(info, defaultConsent) {
|
|
84
|
-
window.clarity?.('consentv2', getClarityConsentPayload(info.consents, defaultConsent));
|
|
85
|
-
}
|
|
86
|
-
const clarityManifest = {
|
|
87
|
-
...external_types_cjs_namespaceObject.vendorManifestContract,
|
|
88
|
-
vendor: 'microsoft-clarity',
|
|
89
|
-
category: 'measurement',
|
|
90
|
-
persistAfterConsentRevoked: true,
|
|
91
|
-
bootstrap: [
|
|
92
|
-
{
|
|
93
|
-
type: 'defineStubFunction',
|
|
94
|
-
name: 'clarity',
|
|
95
|
-
queue: {
|
|
96
|
-
property: 'q'
|
|
97
|
-
},
|
|
98
|
-
queueFormat: 'array',
|
|
99
|
-
ifUndefined: true
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
install: [
|
|
103
|
-
{
|
|
104
|
-
type: 'loadScript',
|
|
105
|
-
src: "{{scriptUrl}}",
|
|
106
|
-
async: true
|
|
107
|
-
}
|
|
108
|
-
]
|
|
109
|
-
};
|
|
110
|
-
function clarity({ id, defaultConsent, scriptUrl }) {
|
|
111
|
-
const normalizedId = id.trim();
|
|
112
|
-
if (void 0 === scriptUrl && 0 === normalizedId.length) throw new Error(`Invalid Clarity id value "${id}". A non-empty id is required to construct the Clarity loader URL when scriptUrl is not provided.`);
|
|
113
|
-
const resolved = (0, external_resolve_cjs_namespaceObject.resolveManifest)(clarityManifest, {
|
|
114
|
-
scriptUrl: scriptUrl ?? `https://www.clarity.ms/tag/${normalizedId}`
|
|
115
|
-
});
|
|
116
|
-
const onBeforeLoad = resolved.onBeforeLoad;
|
|
117
|
-
const onConsentChange = resolved.onConsentChange;
|
|
118
|
-
return {
|
|
119
|
-
...resolved,
|
|
120
|
-
onBeforeLoad: (info)=>{
|
|
121
|
-
onBeforeLoad?.(info);
|
|
122
|
-
syncClarityConsent(info, defaultConsent);
|
|
123
|
-
},
|
|
124
|
-
onConsentChange: (info)=>{
|
|
125
|
-
onConsentChange?.(info);
|
|
126
|
-
syncClarityConsent(info);
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
exports.clarity = __webpack_exports__.clarity;
|
|
131
|
-
exports.clarityManifest = __webpack_exports__.clarityManifest;
|
|
132
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
133
|
-
"clarity",
|
|
134
|
-
"clarityManifest"
|
|
135
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
136
|
-
Object.defineProperty(exports, '__esModule', {
|
|
137
|
-
value: true
|
|
138
|
-
});
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
-
var define = (defs, kind)=>{
|
|
6
|
-
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
[kind]: defs[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
define(getters, "get");
|
|
12
|
-
define(values, "value");
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
-
})();
|
|
18
|
-
(()=>{
|
|
19
|
-
__webpack_require__.r = (exports1)=>{
|
|
20
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
-
value: 'Module'
|
|
22
|
-
});
|
|
23
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
-
value: true
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
})();
|
|
28
|
-
var __webpack_exports__ = {};
|
|
29
|
-
__webpack_require__.r(__webpack_exports__);
|
|
30
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
-
mixpanelAnalytics: ()=>mixpanelAnalytics,
|
|
32
|
-
mixpanelAnalyticsManifest: ()=>mixpanelAnalyticsManifest
|
|
33
|
-
});
|
|
34
|
-
const external_resolve_cjs_namespaceObject = require("../../resolve.cjs");
|
|
35
|
-
const external_types_cjs_namespaceObject = require("../../types.cjs");
|
|
36
|
-
const mixpanelAnalyticsManifest = {
|
|
37
|
-
...external_types_cjs_namespaceObject.vendorManifestContract,
|
|
38
|
-
vendor: 'mixpanel-analytics',
|
|
39
|
-
category: 'measurement',
|
|
40
|
-
alwaysLoad: true,
|
|
41
|
-
install: [
|
|
42
|
-
{
|
|
43
|
-
type: 'setGlobal',
|
|
44
|
-
name: 'mixpanel',
|
|
45
|
-
value: [],
|
|
46
|
-
ifUndefined: true
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
type: 'setGlobalPath',
|
|
50
|
-
path: [
|
|
51
|
-
'mixpanel',
|
|
52
|
-
'__SV'
|
|
53
|
-
],
|
|
54
|
-
value: 1.2
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
type: 'setGlobalPath',
|
|
58
|
-
path: [
|
|
59
|
-
'mixpanel',
|
|
60
|
-
'_i'
|
|
61
|
-
],
|
|
62
|
-
value: [
|
|
63
|
-
[
|
|
64
|
-
'{{token}}',
|
|
65
|
-
'{{initOptions}}',
|
|
66
|
-
'mixpanel'
|
|
67
|
-
]
|
|
68
|
-
]
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
type: 'defineQueueMethods',
|
|
72
|
-
target: 'mixpanel',
|
|
73
|
-
methods: [
|
|
74
|
-
'track',
|
|
75
|
-
'identify',
|
|
76
|
-
'reset',
|
|
77
|
-
'register',
|
|
78
|
-
'opt_in_tracking',
|
|
79
|
-
'opt_out_tracking'
|
|
80
|
-
]
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
type: 'loadScript',
|
|
84
|
-
src: "{{scriptUrl}}",
|
|
85
|
-
async: true
|
|
86
|
-
}
|
|
87
|
-
],
|
|
88
|
-
onLoadGranted: [
|
|
89
|
-
{
|
|
90
|
-
type: 'callGlobal',
|
|
91
|
-
global: 'mixpanel',
|
|
92
|
-
method: 'opt_in_tracking'
|
|
93
|
-
}
|
|
94
|
-
],
|
|
95
|
-
onLoadDenied: [
|
|
96
|
-
{
|
|
97
|
-
type: 'callGlobal',
|
|
98
|
-
global: 'mixpanel',
|
|
99
|
-
method: 'opt_out_tracking'
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
onConsentGranted: [
|
|
103
|
-
{
|
|
104
|
-
type: 'callGlobal',
|
|
105
|
-
global: 'mixpanel',
|
|
106
|
-
method: 'opt_in_tracking'
|
|
107
|
-
}
|
|
108
|
-
],
|
|
109
|
-
onConsentDenied: [
|
|
110
|
-
{
|
|
111
|
-
type: 'callGlobal',
|
|
112
|
-
global: 'mixpanel',
|
|
113
|
-
method: 'opt_out_tracking'
|
|
114
|
-
}
|
|
115
|
-
]
|
|
116
|
-
};
|
|
117
|
-
function mixpanelAnalytics({ token, initOptions, scriptUrl }) {
|
|
118
|
-
const normalizedToken = token.trim();
|
|
119
|
-
if (!/^[a-f0-9]{32}$/i.test(normalizedToken)) throw new Error("mixpanelAnalytics: token must be a non-empty 32-character hexadecimal string");
|
|
120
|
-
return (0, external_resolve_cjs_namespaceObject.resolveManifest)(mixpanelAnalyticsManifest, {
|
|
121
|
-
token: normalizedToken,
|
|
122
|
-
initOptions: initOptions ?? {},
|
|
123
|
-
scriptUrl: scriptUrl ?? 'https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js'
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
exports.mixpanelAnalytics = __webpack_exports__.mixpanelAnalytics;
|
|
127
|
-
exports.mixpanelAnalyticsManifest = __webpack_exports__.mixpanelAnalyticsManifest;
|
|
128
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
129
|
-
"mixpanelAnalytics",
|
|
130
|
-
"mixpanelAnalyticsManifest"
|
|
131
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
132
|
-
Object.defineProperty(exports, '__esModule', {
|
|
133
|
-
value: true
|
|
134
|
-
});
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
-
var define = (defs, kind)=>{
|
|
6
|
-
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
[kind]: defs[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
define(getters, "get");
|
|
12
|
-
define(values, "value");
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
-
})();
|
|
18
|
-
(()=>{
|
|
19
|
-
__webpack_require__.r = (exports1)=>{
|
|
20
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
-
value: 'Module'
|
|
22
|
-
});
|
|
23
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
-
value: true
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
})();
|
|
28
|
-
var __webpack_exports__ = {};
|
|
29
|
-
__webpack_require__.r(__webpack_exports__);
|
|
30
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
-
pirsch: ()=>pirsch,
|
|
32
|
-
pirschManifest: ()=>pirschManifest
|
|
33
|
-
});
|
|
34
|
-
const external_resolve_cjs_namespaceObject = require("../../resolve.cjs");
|
|
35
|
-
const external_types_cjs_namespaceObject = require("../../types.cjs");
|
|
36
|
-
const script_url_cjs_namespaceObject = require("../_shared/script-url.cjs");
|
|
37
|
-
const DEFAULT_PIRSCH_SCRIPT_URL = 'https://api.pirsch.io/pa.js';
|
|
38
|
-
const DEFAULT_PIRSCH_EXTENDED_SCRIPT_URL = 'https://api.pirsch.io/pirsch-extended.js';
|
|
39
|
-
const pirschManifest = {
|
|
40
|
-
...external_types_cjs_namespaceObject.vendorManifestContract,
|
|
41
|
-
vendor: 'pirsch',
|
|
42
|
-
category: 'measurement',
|
|
43
|
-
install: [
|
|
44
|
-
{
|
|
45
|
-
type: 'loadScript',
|
|
46
|
-
src: "{{scriptUrl}}",
|
|
47
|
-
defer: true,
|
|
48
|
-
attributes: {
|
|
49
|
-
id: "{{scriptElementId}}",
|
|
50
|
-
'data-code': '{{identificationCode}}',
|
|
51
|
-
'data-domain': '{{domain}}',
|
|
52
|
-
'data-dev': '{{dev}}',
|
|
53
|
-
'data-hit-endpoint': '{{hitEndpoint}}',
|
|
54
|
-
'data-event-endpoint': '{{eventEndpoint}}',
|
|
55
|
-
'data-disable-page-views': '{{disablePageViews}}'
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
};
|
|
60
|
-
function commaListDataAttribute(value) {
|
|
61
|
-
if (void 0 === value) return;
|
|
62
|
-
if (Array.isArray(value)) {
|
|
63
|
-
const items = value.map((item)=>item.trim()).filter((item)=>item.length > 0);
|
|
64
|
-
if (0 === items.length) return;
|
|
65
|
-
return items.join(',');
|
|
66
|
-
}
|
|
67
|
-
return (0, script_url_cjs_namespaceObject.trimToUndefined)(value);
|
|
68
|
-
}
|
|
69
|
-
function presenceDataAttribute(value) {
|
|
70
|
-
if (true === value) return '';
|
|
71
|
-
}
|
|
72
|
-
function getPirschScriptElementId(options) {
|
|
73
|
-
if (true === options.extended) return 'pirschextendedjs';
|
|
74
|
-
return 'pianjs';
|
|
75
|
-
}
|
|
76
|
-
function getPirschScriptUrl(options) {
|
|
77
|
-
const defaultScriptUrl = true === options.extended ? DEFAULT_PIRSCH_EXTENDED_SCRIPT_URL : DEFAULT_PIRSCH_SCRIPT_URL;
|
|
78
|
-
return (0, script_url_cjs_namespaceObject.resolveScriptUrl)((0, script_url_cjs_namespaceObject.trimToUndefined)(options.scriptUrl), defaultScriptUrl);
|
|
79
|
-
}
|
|
80
|
-
function pirsch(options) {
|
|
81
|
-
const identificationCode = options.identificationCode.trim();
|
|
82
|
-
if (0 === identificationCode.length) throw new Error('pirsch: invalid identificationCode - must be a non-empty string');
|
|
83
|
-
const resolved = (0, external_resolve_cjs_namespaceObject.resolveManifest)(pirschManifest, {
|
|
84
|
-
identificationCode,
|
|
85
|
-
domain: commaListDataAttribute(options.domain),
|
|
86
|
-
dev: (0, script_url_cjs_namespaceObject.trimToUndefined)(options.dev),
|
|
87
|
-
hitEndpoint: (0, script_url_cjs_namespaceObject.trimToUndefined)(options.hitEndpoint),
|
|
88
|
-
eventEndpoint: (0, script_url_cjs_namespaceObject.trimToUndefined)(options.eventEndpoint),
|
|
89
|
-
disablePageViews: presenceDataAttribute(options.disablePageViews),
|
|
90
|
-
scriptElementId: getPirschScriptElementId(options),
|
|
91
|
-
scriptUrl: getPirschScriptUrl(options)
|
|
92
|
-
});
|
|
93
|
-
const manifestOnLoad = resolved.onLoad;
|
|
94
|
-
resolved.onLoad = (info)=>{
|
|
95
|
-
manifestOnLoad?.(info);
|
|
96
|
-
if ('loading' !== document.readyState) window.pirschInit?.();
|
|
97
|
-
};
|
|
98
|
-
return resolved;
|
|
99
|
-
}
|
|
100
|
-
exports.pirsch = __webpack_exports__.pirsch;
|
|
101
|
-
exports.pirschManifest = __webpack_exports__.pirschManifest;
|
|
102
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
103
|
-
"pirsch",
|
|
104
|
-
"pirschManifest"
|
|
105
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
106
|
-
Object.defineProperty(exports, '__esModule', {
|
|
107
|
-
value: true
|
|
108
|
-
});
|