@c15t/scripts 2.0.1 → 2.1.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/README.md +9 -9
- package/dist/engine/runtime.cjs +11 -0
- package/dist/engine/runtime.js +11 -0
- package/dist/registry.cjs +338 -0
- package/dist/registry.js +292 -0
- package/dist/types.cjs +18 -0
- package/dist/types.js +10 -1
- package/dist/vendors/_shared/attributes.cjs +51 -0
- package/dist/vendors/_shared/attributes.js +14 -0
- package/dist/vendors/_shared/google-consent.cjs +64 -0
- package/dist/vendors/_shared/google-consent.js +27 -0
- package/dist/vendors/_shared/install-builders.cjs +55 -0
- package/dist/vendors/_shared/install-builders.js +21 -0
- package/dist/vendors/_shared/script-url.cjs +74 -0
- package/dist/vendors/_shared/script-url.js +28 -0
- package/dist/{linkedin-insights.cjs → vendors/ads-and-pixels/linkedin-insights.cjs} +2 -2
- package/dist/{linkedin-insights.js → vendors/ads-and-pixels/linkedin-insights.js} +2 -2
- package/dist/vendors/ads-and-pixels/meta-pixel.cjs +202 -0
- package/dist/vendors/ads-and-pixels/meta-pixel.js +153 -0
- package/dist/{microsoft-uet.cjs → vendors/ads-and-pixels/microsoft-uet.cjs} +31 -14
- package/dist/{microsoft-uet.js → vendors/ads-and-pixels/microsoft-uet.js} +31 -14
- package/dist/vendors/ads-and-pixels/reddit-pixel.cjs +147 -0
- package/dist/vendors/ads-and-pixels/reddit-pixel.js +107 -0
- package/dist/vendors/ads-and-pixels/snapchat-pixel.cjs +127 -0
- package/dist/vendors/ads-and-pixels/snapchat-pixel.js +87 -0
- package/dist/{tiktok-pixel.cjs → vendors/ads-and-pixels/tiktok-pixel.cjs} +2 -2
- package/dist/{tiktok-pixel.js → vendors/ads-and-pixels/tiktok-pixel.js} +2 -2
- package/dist/{x-pixel.cjs → vendors/ads-and-pixels/x-pixel.cjs} +6 -3
- package/dist/{x-pixel.js → vendors/ads-and-pixels/x-pixel.js} +6 -3
- package/dist/vendors/analytics/ahrefs-analytics.cjs +64 -0
- package/dist/vendors/analytics/ahrefs-analytics.js +27 -0
- package/dist/vendors/analytics/cloudflare-web-analytics.cjs +69 -0
- package/dist/vendors/analytics/cloudflare-web-analytics.js +32 -0
- package/dist/{databuddy.cjs → vendors/analytics/databuddy.cjs} +3 -3
- package/dist/{databuddy.js → vendors/analytics/databuddy.js} +3 -3
- package/dist/vendors/analytics/fathom-analytics.cjs +72 -0
- package/dist/vendors/analytics/fathom-analytics.js +35 -0
- package/dist/{google-tag.cjs → vendors/analytics/google-tag.cjs} +7 -28
- package/dist/{google-tag.js → vendors/analytics/google-tag.js} +7 -28
- package/dist/vendors/analytics/hotjar.cjs +81 -0
- package/dist/vendors/analytics/hotjar.js +44 -0
- package/dist/vendors/analytics/matomo-analytics.cjs +228 -0
- package/dist/vendors/analytics/matomo-analytics.js +191 -0
- package/dist/vendors/analytics/microsoft-clarity.cjs +110 -0
- package/dist/vendors/analytics/microsoft-clarity.js +73 -0
- package/dist/vendors/analytics/mixpanel-analytics.cjs +119 -0
- package/dist/vendors/analytics/mixpanel-analytics.js +82 -0
- package/dist/vendors/analytics/plausible-analytics.cjs +118 -0
- package/dist/vendors/analytics/plausible-analytics.js +81 -0
- package/dist/{posthog.cjs → vendors/analytics/posthog.cjs} +69 -6
- package/dist/vendors/analytics/posthog.js +163 -0
- package/dist/vendors/analytics/promptwatch.cjs +66 -0
- package/dist/vendors/analytics/promptwatch.js +29 -0
- package/dist/vendors/analytics/rybbit-analytics.cjs +100 -0
- package/dist/vendors/analytics/rybbit-analytics.js +63 -0
- package/dist/vendors/analytics/segment.cjs +93 -0
- package/dist/vendors/analytics/segment.js +56 -0
- package/dist/vendors/analytics/umami-analytics.cjs +76 -0
- package/dist/vendors/analytics/umami-analytics.js +39 -0
- package/dist/vendors/analytics/vercel-analytics.cjs +90 -0
- package/dist/vendors/analytics/vercel-analytics.js +53 -0
- package/dist/vendors/functional/crisp.cjs +139 -0
- package/dist/vendors/functional/crisp.js +102 -0
- package/dist/vendors/functional/intercom.cjs +85 -0
- package/dist/vendors/functional/intercom.js +45 -0
- package/dist/{google-tag-manager.cjs → vendors/tag-managers/google-tag-manager.cjs} +6 -27
- package/dist/{google-tag-manager.js → vendors/tag-managers/google-tag-manager.js} +6 -27
- package/dist-types/__tests__/helpers.d.ts +141 -0
- package/dist-types/engine/runtime.d.ts +1 -1
- package/dist-types/registry.d.ts +368 -0
- package/dist-types/types.d.ts +13 -0
- package/dist-types/vendors/_shared/attributes.d.ts +35 -0
- package/dist-types/vendors/_shared/google-consent.d.ts +47 -0
- package/dist-types/vendors/_shared/install-builders.d.ts +30 -0
- package/dist-types/vendors/_shared/script-url.d.ts +75 -0
- package/dist-types/{linkedin-insights.d.ts → vendors/ads-and-pixels/linkedin-insights.d.ts} +22 -9
- package/dist-types/vendors/ads-and-pixels/meta-pixel.d.ts +289 -0
- package/dist-types/{microsoft-uet.d.ts → vendors/ads-and-pixels/microsoft-uet.d.ts} +21 -10
- package/dist-types/vendors/ads-and-pixels/reddit-pixel.d.ts +211 -0
- package/dist-types/vendors/ads-and-pixels/snapchat-pixel.d.ts +171 -0
- package/dist-types/{tiktok-pixel.d.ts → vendors/ads-and-pixels/tiktok-pixel.d.ts} +20 -5
- package/dist-types/{x-pixel.d.ts → vendors/ads-and-pixels/x-pixel.d.ts} +21 -4
- package/dist-types/vendors/analytics/ahrefs-analytics.d.ts +62 -0
- package/dist-types/vendors/analytics/cloudflare-web-analytics.d.ts +67 -0
- package/dist-types/vendors/analytics/fathom-analytics.d.ts +90 -0
- package/dist-types/{google-tag.d.ts → vendors/analytics/google-tag.d.ts} +5 -8
- package/dist-types/vendors/analytics/hotjar.d.ts +73 -0
- package/dist-types/vendors/analytics/matomo-analytics.d.ts +41 -0
- package/dist-types/vendors/analytics/microsoft-clarity.d.ts +86 -0
- package/dist-types/vendors/analytics/mixpanel-analytics.d.ts +101 -0
- package/dist-types/vendors/analytics/plausible-analytics.d.ts +122 -0
- package/dist-types/{posthog.d.ts → vendors/analytics/posthog.d.ts} +47 -5
- package/dist-types/vendors/analytics/promptwatch.d.ts +36 -0
- package/dist-types/vendors/analytics/rybbit-analytics.d.ts +82 -0
- package/dist-types/vendors/analytics/segment.d.ts +158 -0
- package/dist-types/vendors/analytics/umami-analytics.d.ts +93 -0
- package/dist-types/vendors/analytics/vercel-analytics.d.ts +66 -0
- package/dist-types/vendors/functional/crisp.d.ts +78 -0
- package/dist-types/vendors/functional/intercom.d.ts +135 -0
- package/dist-types/{google-tag-manager.d.ts → vendors/tag-managers/google-tag-manager.d.ts} +5 -8
- package/package.json +165 -4
- package/dist/meta-pixel.cjs +0 -129
- package/dist/meta-pixel.js +0 -89
- package/dist/posthog.js +0 -100
- package/dist-types/meta-pixel.d.ts +0 -185
- /package/dist-types/{databuddy.d.ts → vendors/analytics/databuddy.d.ts} +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { resolveManifest } from "../../resolve.js";
|
|
2
|
+
import { vendorManifestContract } from "../../types.js";
|
|
3
|
+
import { buildQueuePixelInstall } from "../_shared/install-builders.js";
|
|
4
|
+
import { resolveScriptUrl } from "../_shared/script-url.js";
|
|
5
|
+
const redditPixelManifest = {
|
|
6
|
+
...vendorManifestContract,
|
|
7
|
+
vendor: 'reddit-pixel',
|
|
8
|
+
category: 'marketing',
|
|
9
|
+
persistAfterConsentRevoked: true,
|
|
10
|
+
bootstrap: [
|
|
11
|
+
{
|
|
12
|
+
type: 'defineStubFunction',
|
|
13
|
+
name: 'rdt',
|
|
14
|
+
queue: {
|
|
15
|
+
property: 'callQueue'
|
|
16
|
+
},
|
|
17
|
+
dispatchProperty: 'sendEvent',
|
|
18
|
+
queueFormat: 'array',
|
|
19
|
+
ifUndefined: true
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
install: [
|
|
23
|
+
{
|
|
24
|
+
type: 'callGlobal',
|
|
25
|
+
global: 'rdt',
|
|
26
|
+
args: [
|
|
27
|
+
'init',
|
|
28
|
+
'{{pixelId}}'
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: 'callGlobal',
|
|
33
|
+
global: 'rdt',
|
|
34
|
+
args: [
|
|
35
|
+
'track',
|
|
36
|
+
'PageVisit'
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
type: 'loadScript',
|
|
41
|
+
src: "{{scriptUrl}}",
|
|
42
|
+
async: true
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
onConsentGranted: [
|
|
46
|
+
{
|
|
47
|
+
type: 'callGlobal',
|
|
48
|
+
global: 'rdt',
|
|
49
|
+
args: [
|
|
50
|
+
'enableFirstPartyCookies'
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
onConsentDenied: [
|
|
55
|
+
{
|
|
56
|
+
type: 'callGlobal',
|
|
57
|
+
global: 'rdt',
|
|
58
|
+
args: [
|
|
59
|
+
'disableFirstPartyCookies'
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
};
|
|
64
|
+
function redditPixel({ pixelId, trackPageVisit = true, initOptions, disableFirstPartyCookies, scriptUrl }) {
|
|
65
|
+
let trackStep;
|
|
66
|
+
if (trackPageVisit) trackStep = {
|
|
67
|
+
args: [
|
|
68
|
+
'track',
|
|
69
|
+
'PageVisit'
|
|
70
|
+
]
|
|
71
|
+
};
|
|
72
|
+
const resolvedInitOptions = getRedditPixelInitOptions({
|
|
73
|
+
initOptions,
|
|
74
|
+
disableFirstPartyCookies
|
|
75
|
+
});
|
|
76
|
+
const initArgs = [
|
|
77
|
+
'init',
|
|
78
|
+
'{{pixelId}}'
|
|
79
|
+
];
|
|
80
|
+
if (void 0 !== resolvedInitOptions) initArgs.push('{{initOptions}}');
|
|
81
|
+
const install = buildQueuePixelInstall({
|
|
82
|
+
global: 'rdt',
|
|
83
|
+
initArgs,
|
|
84
|
+
trackStep
|
|
85
|
+
});
|
|
86
|
+
const manifest = {
|
|
87
|
+
...redditPixelManifest,
|
|
88
|
+
install
|
|
89
|
+
};
|
|
90
|
+
return resolveManifest(manifest, {
|
|
91
|
+
pixelId,
|
|
92
|
+
initOptions: resolvedInitOptions,
|
|
93
|
+
scriptUrl: resolveScriptUrl(scriptUrl, 'https://www.redditstatic.com/ads/pixel.js')
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function getRedditPixelInitOptions({ initOptions, disableFirstPartyCookies }) {
|
|
97
|
+
if (void 0 === disableFirstPartyCookies) return initOptions;
|
|
98
|
+
return {
|
|
99
|
+
...initOptions,
|
|
100
|
+
disableFirstPartyCookies
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
const redditPixelEvent = (eventName, metadata)=>{
|
|
104
|
+
if ("u" < typeof window || 'function' != typeof window.rdt) return;
|
|
105
|
+
window.rdt('track', eventName, metadata);
|
|
106
|
+
};
|
|
107
|
+
export { redditPixel, redditPixelEvent, redditPixelManifest };
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
snapchatPixel: ()=>snapchatPixel,
|
|
28
|
+
snapchatPixelManifest: ()=>snapchatPixelManifest,
|
|
29
|
+
snapchatPixelEvent: ()=>snapchatPixelEvent
|
|
30
|
+
});
|
|
31
|
+
const external_resolve_cjs_namespaceObject = require("../../resolve.cjs");
|
|
32
|
+
const external_types_cjs_namespaceObject = require("../../types.cjs");
|
|
33
|
+
const install_builders_cjs_namespaceObject = require("../_shared/install-builders.cjs");
|
|
34
|
+
const script_url_cjs_namespaceObject = require("../_shared/script-url.cjs");
|
|
35
|
+
const snapchatPixelManifest = {
|
|
36
|
+
...external_types_cjs_namespaceObject.vendorManifestContract,
|
|
37
|
+
vendor: 'snapchat-pixel',
|
|
38
|
+
category: 'marketing',
|
|
39
|
+
bootstrap: [
|
|
40
|
+
{
|
|
41
|
+
type: 'defineStubFunction',
|
|
42
|
+
name: 'snaptr',
|
|
43
|
+
queue: {
|
|
44
|
+
property: 'queue'
|
|
45
|
+
},
|
|
46
|
+
dispatchProperty: 'handleRequest',
|
|
47
|
+
queueFormat: 'array',
|
|
48
|
+
aliases: [
|
|
49
|
+
'_snaptr'
|
|
50
|
+
],
|
|
51
|
+
selfReferences: [
|
|
52
|
+
'push'
|
|
53
|
+
],
|
|
54
|
+
properties: {
|
|
55
|
+
loaded: true,
|
|
56
|
+
version: '1.0'
|
|
57
|
+
},
|
|
58
|
+
ifUndefined: true
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
install: [
|
|
62
|
+
{
|
|
63
|
+
type: 'callGlobal',
|
|
64
|
+
global: 'snaptr',
|
|
65
|
+
args: [
|
|
66
|
+
'init',
|
|
67
|
+
'{{pixelId}}'
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
type: 'callGlobal',
|
|
72
|
+
global: 'snaptr',
|
|
73
|
+
args: [
|
|
74
|
+
'track',
|
|
75
|
+
'PAGE_VIEW'
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
type: 'loadScript',
|
|
80
|
+
src: "{{scriptUrl}}",
|
|
81
|
+
async: true
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
};
|
|
85
|
+
function snapchatPixel({ pixelId, initOptions, trackPageView = true, scriptUrl }) {
|
|
86
|
+
const initArgs = [
|
|
87
|
+
'init',
|
|
88
|
+
'{{pixelId}}'
|
|
89
|
+
];
|
|
90
|
+
if (void 0 !== initOptions) initArgs.push('{{initOptions}}');
|
|
91
|
+
let trackStep;
|
|
92
|
+
if (trackPageView) trackStep = {
|
|
93
|
+
args: [
|
|
94
|
+
'track',
|
|
95
|
+
'PAGE_VIEW'
|
|
96
|
+
]
|
|
97
|
+
};
|
|
98
|
+
const install = (0, install_builders_cjs_namespaceObject.buildQueuePixelInstall)({
|
|
99
|
+
global: 'snaptr',
|
|
100
|
+
initArgs,
|
|
101
|
+
trackStep
|
|
102
|
+
});
|
|
103
|
+
const manifest = {
|
|
104
|
+
...snapchatPixelManifest,
|
|
105
|
+
install
|
|
106
|
+
};
|
|
107
|
+
return (0, external_resolve_cjs_namespaceObject.resolveManifest)(manifest, {
|
|
108
|
+
pixelId,
|
|
109
|
+
initOptions,
|
|
110
|
+
scriptUrl: (0, script_url_cjs_namespaceObject.resolveScriptUrl)(scriptUrl, 'https://sc-static.net/scevent.min.js')
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
const snapchatPixelEvent = (eventName, properties)=>{
|
|
114
|
+
if ("u" < typeof window || 'function' != typeof window.snaptr) return;
|
|
115
|
+
window.snaptr('track', eventName, properties);
|
|
116
|
+
};
|
|
117
|
+
exports.snapchatPixel = __webpack_exports__.snapchatPixel;
|
|
118
|
+
exports.snapchatPixelEvent = __webpack_exports__.snapchatPixelEvent;
|
|
119
|
+
exports.snapchatPixelManifest = __webpack_exports__.snapchatPixelManifest;
|
|
120
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
121
|
+
"snapchatPixel",
|
|
122
|
+
"snapchatPixelEvent",
|
|
123
|
+
"snapchatPixelManifest"
|
|
124
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
125
|
+
Object.defineProperty(exports, '__esModule', {
|
|
126
|
+
value: true
|
|
127
|
+
});
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { resolveManifest } from "../../resolve.js";
|
|
2
|
+
import { vendorManifestContract } from "../../types.js";
|
|
3
|
+
import { buildQueuePixelInstall } from "../_shared/install-builders.js";
|
|
4
|
+
import { resolveScriptUrl } from "../_shared/script-url.js";
|
|
5
|
+
const snapchatPixelManifest = {
|
|
6
|
+
...vendorManifestContract,
|
|
7
|
+
vendor: 'snapchat-pixel',
|
|
8
|
+
category: 'marketing',
|
|
9
|
+
bootstrap: [
|
|
10
|
+
{
|
|
11
|
+
type: 'defineStubFunction',
|
|
12
|
+
name: 'snaptr',
|
|
13
|
+
queue: {
|
|
14
|
+
property: 'queue'
|
|
15
|
+
},
|
|
16
|
+
dispatchProperty: 'handleRequest',
|
|
17
|
+
queueFormat: 'array',
|
|
18
|
+
aliases: [
|
|
19
|
+
'_snaptr'
|
|
20
|
+
],
|
|
21
|
+
selfReferences: [
|
|
22
|
+
'push'
|
|
23
|
+
],
|
|
24
|
+
properties: {
|
|
25
|
+
loaded: true,
|
|
26
|
+
version: '1.0'
|
|
27
|
+
},
|
|
28
|
+
ifUndefined: true
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
install: [
|
|
32
|
+
{
|
|
33
|
+
type: 'callGlobal',
|
|
34
|
+
global: 'snaptr',
|
|
35
|
+
args: [
|
|
36
|
+
'init',
|
|
37
|
+
'{{pixelId}}'
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: 'callGlobal',
|
|
42
|
+
global: 'snaptr',
|
|
43
|
+
args: [
|
|
44
|
+
'track',
|
|
45
|
+
'PAGE_VIEW'
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
type: 'loadScript',
|
|
50
|
+
src: "{{scriptUrl}}",
|
|
51
|
+
async: true
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
};
|
|
55
|
+
function snapchatPixel({ pixelId, initOptions, trackPageView = true, scriptUrl }) {
|
|
56
|
+
const initArgs = [
|
|
57
|
+
'init',
|
|
58
|
+
'{{pixelId}}'
|
|
59
|
+
];
|
|
60
|
+
if (void 0 !== initOptions) initArgs.push('{{initOptions}}');
|
|
61
|
+
let trackStep;
|
|
62
|
+
if (trackPageView) trackStep = {
|
|
63
|
+
args: [
|
|
64
|
+
'track',
|
|
65
|
+
'PAGE_VIEW'
|
|
66
|
+
]
|
|
67
|
+
};
|
|
68
|
+
const install = buildQueuePixelInstall({
|
|
69
|
+
global: 'snaptr',
|
|
70
|
+
initArgs,
|
|
71
|
+
trackStep
|
|
72
|
+
});
|
|
73
|
+
const manifest = {
|
|
74
|
+
...snapchatPixelManifest,
|
|
75
|
+
install
|
|
76
|
+
};
|
|
77
|
+
return resolveManifest(manifest, {
|
|
78
|
+
pixelId,
|
|
79
|
+
initOptions,
|
|
80
|
+
scriptUrl: resolveScriptUrl(scriptUrl, 'https://sc-static.net/scevent.min.js')
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
const snapchatPixelEvent = (eventName, properties)=>{
|
|
84
|
+
if ("u" < typeof window || 'function' != typeof window.snaptr) return;
|
|
85
|
+
window.snaptr('track', eventName, properties);
|
|
86
|
+
};
|
|
87
|
+
export { snapchatPixel, snapchatPixelEvent, snapchatPixelManifest };
|
|
@@ -27,8 +27,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
27
27
|
tiktokPixel: ()=>tiktokPixel,
|
|
28
28
|
tiktokPixelManifest: ()=>tiktokPixelManifest
|
|
29
29
|
});
|
|
30
|
-
const external_resolve_cjs_namespaceObject = require("
|
|
31
|
-
const external_types_cjs_namespaceObject = require("
|
|
30
|
+
const external_resolve_cjs_namespaceObject = require("../../resolve.cjs");
|
|
31
|
+
const external_types_cjs_namespaceObject = require("../../types.cjs");
|
|
32
32
|
const tiktokPixelManifest = {
|
|
33
33
|
...external_types_cjs_namespaceObject.vendorManifestContract,
|
|
34
34
|
vendor: 'tiktok-pixel',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveManifest } from "
|
|
2
|
-
import { vendorManifestContract } from "
|
|
1
|
+
import { resolveManifest } from "../../resolve.js";
|
|
2
|
+
import { vendorManifestContract } from "../../types.js";
|
|
3
3
|
const tiktokPixelManifest = {
|
|
4
4
|
...vendorManifestContract,
|
|
5
5
|
vendor: 'tiktok-pixel',
|
|
@@ -28,8 +28,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
xPixelEvent: ()=>xPixelEvent,
|
|
29
29
|
xPixelManifest: ()=>xPixelManifest
|
|
30
30
|
});
|
|
31
|
-
const external_resolve_cjs_namespaceObject = require("
|
|
32
|
-
const external_types_cjs_namespaceObject = require("
|
|
31
|
+
const external_resolve_cjs_namespaceObject = require("../../resolve.cjs");
|
|
32
|
+
const external_types_cjs_namespaceObject = require("../../types.cjs");
|
|
33
33
|
const xPixelManifest = {
|
|
34
34
|
...external_types_cjs_namespaceObject.vendorManifestContract,
|
|
35
35
|
vendor: 'x-pixel',
|
|
@@ -71,7 +71,10 @@ function xPixel({ pixelId, scriptSrc }) {
|
|
|
71
71
|
});
|
|
72
72
|
return resolved;
|
|
73
73
|
}
|
|
74
|
-
const xPixelEvent = (eventId, metadata)=>
|
|
74
|
+
const xPixelEvent = (eventId, metadata)=>{
|
|
75
|
+
if ("u" < typeof window || 'function' != typeof window.twq) throw new Error('X Pixel (twq) is not loaded. Ensure marketing consent is granted before calling xPixelEvent.');
|
|
76
|
+
window.twq('event', eventId, metadata);
|
|
77
|
+
};
|
|
75
78
|
exports.xPixel = __webpack_exports__.xPixel;
|
|
76
79
|
exports.xPixelEvent = __webpack_exports__.xPixelEvent;
|
|
77
80
|
exports.xPixelManifest = __webpack_exports__.xPixelManifest;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveManifest } from "
|
|
2
|
-
import { vendorManifestContract } from "
|
|
1
|
+
import { resolveManifest } from "../../resolve.js";
|
|
2
|
+
import { vendorManifestContract } from "../../types.js";
|
|
3
3
|
const xPixelManifest = {
|
|
4
4
|
...vendorManifestContract,
|
|
5
5
|
vendor: 'x-pixel',
|
|
@@ -41,5 +41,8 @@ function xPixel({ pixelId, scriptSrc }) {
|
|
|
41
41
|
});
|
|
42
42
|
return resolved;
|
|
43
43
|
}
|
|
44
|
-
const xPixelEvent = (eventId, metadata)=>
|
|
44
|
+
const xPixelEvent = (eventId, metadata)=>{
|
|
45
|
+
if ("u" < typeof window || 'function' != typeof window.twq) throw new Error('X Pixel (twq) is not loaded. Ensure marketing consent is granted before calling xPixelEvent.');
|
|
46
|
+
window.twq('event', eventId, metadata);
|
|
47
|
+
};
|
|
45
48
|
export { xPixel, xPixelEvent, xPixelManifest };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
ahrefsAnalyticsManifest: ()=>ahrefsAnalyticsManifest,
|
|
28
|
+
ahrefsAnalytics: ()=>ahrefsAnalytics
|
|
29
|
+
});
|
|
30
|
+
const external_resolve_cjs_namespaceObject = require("../../resolve.cjs");
|
|
31
|
+
const external_types_cjs_namespaceObject = require("../../types.cjs");
|
|
32
|
+
const script_url_cjs_namespaceObject = require("../_shared/script-url.cjs");
|
|
33
|
+
const ahrefsAnalyticsManifest = {
|
|
34
|
+
...external_types_cjs_namespaceObject.vendorManifestContract,
|
|
35
|
+
vendor: 'ahrefs-analytics',
|
|
36
|
+
category: 'measurement',
|
|
37
|
+
install: [
|
|
38
|
+
{
|
|
39
|
+
type: 'loadScript',
|
|
40
|
+
src: "{{scriptUrl}}",
|
|
41
|
+
async: true,
|
|
42
|
+
attributes: {
|
|
43
|
+
'data-key': '{{key}}'
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
};
|
|
48
|
+
function ahrefsAnalytics(options) {
|
|
49
|
+
const key = 'string' == typeof options.key ? options.key.trim() : '';
|
|
50
|
+
if (0 === key.length) throw new Error('ahrefsAnalytics: missing or invalid key');
|
|
51
|
+
return (0, external_resolve_cjs_namespaceObject.resolveManifest)(ahrefsAnalyticsManifest, {
|
|
52
|
+
key,
|
|
53
|
+
scriptUrl: (0, script_url_cjs_namespaceObject.resolveScriptUrl)(options.scriptUrl, 'https://analytics.ahrefs.com/analytics.js')
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
exports.ahrefsAnalytics = __webpack_exports__.ahrefsAnalytics;
|
|
57
|
+
exports.ahrefsAnalyticsManifest = __webpack_exports__.ahrefsAnalyticsManifest;
|
|
58
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
59
|
+
"ahrefsAnalytics",
|
|
60
|
+
"ahrefsAnalyticsManifest"
|
|
61
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
62
|
+
Object.defineProperty(exports, '__esModule', {
|
|
63
|
+
value: true
|
|
64
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { resolveManifest } from "../../resolve.js";
|
|
2
|
+
import { vendorManifestContract } from "../../types.js";
|
|
3
|
+
import { resolveScriptUrl } from "../_shared/script-url.js";
|
|
4
|
+
const ahrefsAnalyticsManifest = {
|
|
5
|
+
...vendorManifestContract,
|
|
6
|
+
vendor: 'ahrefs-analytics',
|
|
7
|
+
category: 'measurement',
|
|
8
|
+
install: [
|
|
9
|
+
{
|
|
10
|
+
type: 'loadScript',
|
|
11
|
+
src: "{{scriptUrl}}",
|
|
12
|
+
async: true,
|
|
13
|
+
attributes: {
|
|
14
|
+
'data-key': '{{key}}'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
};
|
|
19
|
+
function ahrefsAnalytics(options) {
|
|
20
|
+
const key = 'string' == typeof options.key ? options.key.trim() : '';
|
|
21
|
+
if (0 === key.length) throw new Error('ahrefsAnalytics: missing or invalid key');
|
|
22
|
+
return resolveManifest(ahrefsAnalyticsManifest, {
|
|
23
|
+
key,
|
|
24
|
+
scriptUrl: resolveScriptUrl(options.scriptUrl, 'https://analytics.ahrefs.com/analytics.js')
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
export { ahrefsAnalytics, ahrefsAnalyticsManifest };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
cloudflareWebAnalyticsManifest: ()=>cloudflareWebAnalyticsManifest,
|
|
28
|
+
cloudflareWebAnalytics: ()=>cloudflareWebAnalytics
|
|
29
|
+
});
|
|
30
|
+
const external_resolve_cjs_namespaceObject = require("../../resolve.cjs");
|
|
31
|
+
const external_types_cjs_namespaceObject = require("../../types.cjs");
|
|
32
|
+
const script_url_cjs_namespaceObject = require("../_shared/script-url.cjs");
|
|
33
|
+
const cloudflareWebAnalyticsManifest = {
|
|
34
|
+
...external_types_cjs_namespaceObject.vendorManifestContract,
|
|
35
|
+
vendor: 'cloudflare-web-analytics',
|
|
36
|
+
category: 'measurement',
|
|
37
|
+
install: [
|
|
38
|
+
{
|
|
39
|
+
type: 'loadScript',
|
|
40
|
+
src: "{{scriptUrl}}",
|
|
41
|
+
defer: true,
|
|
42
|
+
attributes: {
|
|
43
|
+
'data-cf-beacon': '{{beaconConfig}}'
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
};
|
|
48
|
+
function cloudflareWebAnalytics(options) {
|
|
49
|
+
let token;
|
|
50
|
+
token = 'string' == typeof options.token ? options.token.trim() : '';
|
|
51
|
+
if (0 === token.length) throw new Error('cloudflareWebAnalytics: missing token');
|
|
52
|
+
const resolved = (0, external_resolve_cjs_namespaceObject.resolveManifest)(cloudflareWebAnalyticsManifest, {
|
|
53
|
+
scriptUrl: (0, script_url_cjs_namespaceObject.resolveScriptUrl)(options.scriptUrl, 'https://static.cloudflareinsights.com/beacon.min.js'),
|
|
54
|
+
beaconConfig: JSON.stringify({
|
|
55
|
+
token,
|
|
56
|
+
spa: options.spa ?? true
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
return resolved;
|
|
60
|
+
}
|
|
61
|
+
exports.cloudflareWebAnalytics = __webpack_exports__.cloudflareWebAnalytics;
|
|
62
|
+
exports.cloudflareWebAnalyticsManifest = __webpack_exports__.cloudflareWebAnalyticsManifest;
|
|
63
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
64
|
+
"cloudflareWebAnalytics",
|
|
65
|
+
"cloudflareWebAnalyticsManifest"
|
|
66
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
67
|
+
Object.defineProperty(exports, '__esModule', {
|
|
68
|
+
value: true
|
|
69
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { resolveManifest } from "../../resolve.js";
|
|
2
|
+
import { vendorManifestContract } from "../../types.js";
|
|
3
|
+
import { resolveScriptUrl } from "../_shared/script-url.js";
|
|
4
|
+
const cloudflareWebAnalyticsManifest = {
|
|
5
|
+
...vendorManifestContract,
|
|
6
|
+
vendor: 'cloudflare-web-analytics',
|
|
7
|
+
category: 'measurement',
|
|
8
|
+
install: [
|
|
9
|
+
{
|
|
10
|
+
type: 'loadScript',
|
|
11
|
+
src: "{{scriptUrl}}",
|
|
12
|
+
defer: true,
|
|
13
|
+
attributes: {
|
|
14
|
+
'data-cf-beacon': '{{beaconConfig}}'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
};
|
|
19
|
+
function cloudflareWebAnalytics(options) {
|
|
20
|
+
let token;
|
|
21
|
+
token = 'string' == typeof options.token ? options.token.trim() : '';
|
|
22
|
+
if (0 === token.length) throw new Error('cloudflareWebAnalytics: missing token');
|
|
23
|
+
const resolved = resolveManifest(cloudflareWebAnalyticsManifest, {
|
|
24
|
+
scriptUrl: resolveScriptUrl(options.scriptUrl, 'https://static.cloudflareinsights.com/beacon.min.js'),
|
|
25
|
+
beaconConfig: JSON.stringify({
|
|
26
|
+
token,
|
|
27
|
+
spa: options.spa ?? true
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
return resolved;
|
|
31
|
+
}
|
|
32
|
+
export { cloudflareWebAnalytics, cloudflareWebAnalyticsManifest };
|
|
@@ -27,8 +27,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
27
27
|
databuddyManifest: ()=>databuddyManifest,
|
|
28
28
|
databuddy: ()=>databuddy
|
|
29
29
|
});
|
|
30
|
-
const external_resolve_cjs_namespaceObject = require("
|
|
31
|
-
const external_types_cjs_namespaceObject = require("
|
|
30
|
+
const external_resolve_cjs_namespaceObject = require("../../resolve.cjs");
|
|
31
|
+
const external_types_cjs_namespaceObject = require("../../types.cjs");
|
|
32
32
|
const databuddyManifest = {
|
|
33
33
|
...external_types_cjs_namespaceObject.vendorManifestContract,
|
|
34
34
|
vendor: 'databuddy',
|
|
@@ -122,7 +122,7 @@ const databuddyManifest = {
|
|
|
122
122
|
function databuddy(options) {
|
|
123
123
|
const resolved = (0, external_resolve_cjs_namespaceObject.resolveManifest)(databuddyManifest, {
|
|
124
124
|
clientId: options.clientId,
|
|
125
|
-
apiUrl: options.apiUrl,
|
|
125
|
+
apiUrl: options.apiUrl ?? 'https://basket.databuddy.cc',
|
|
126
126
|
configWhenGranted: options.configWhenGranted,
|
|
127
127
|
configWhenDenied: options.configWhenDenied,
|
|
128
128
|
scriptUrl: options.scriptUrl ?? 'https://cdn.databuddy.cc/databuddy.js'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveManifest } from "
|
|
2
|
-
import { vendorManifestContract } from "
|
|
1
|
+
import { resolveManifest } from "../../resolve.js";
|
|
2
|
+
import { vendorManifestContract } from "../../types.js";
|
|
3
3
|
const databuddyManifest = {
|
|
4
4
|
...vendorManifestContract,
|
|
5
5
|
vendor: 'databuddy',
|
|
@@ -93,7 +93,7 @@ const databuddyManifest = {
|
|
|
93
93
|
function databuddy(options) {
|
|
94
94
|
const resolved = resolveManifest(databuddyManifest, {
|
|
95
95
|
clientId: options.clientId,
|
|
96
|
-
apiUrl: options.apiUrl,
|
|
96
|
+
apiUrl: options.apiUrl ?? 'https://basket.databuddy.cc',
|
|
97
97
|
configWhenGranted: options.configWhenGranted,
|
|
98
98
|
configWhenDenied: options.configWhenDenied,
|
|
99
99
|
scriptUrl: options.scriptUrl ?? 'https://cdn.databuddy.cc/databuddy.js'
|