@c15t/scripts 2.0.1 → 2.2.0-canary-20260727202135
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 +62 -0
- package/README.md +41 -29
- package/dist/e2e-test-utils.cjs +51 -10
- package/dist/e2e-test-utils.js +37 -3
- package/dist/engine/compile.cjs +9 -5
- package/dist/engine/runtime.cjs +111 -17
- package/dist/engine/runtime.js +102 -12
- package/dist/registry.cjs +423 -0
- package/dist/registry.js +372 -0
- package/dist/resolve.cjs +9 -5
- package/dist/types.cjs +32 -10
- package/dist/types.js +10 -1
- package/dist/vendors/_shared/attributes.cjs +55 -0
- package/dist/vendors/_shared/attributes.js +14 -0
- package/dist/vendors/_shared/google-consent.cjs +69 -0
- package/dist/vendors/_shared/google-consent.js +27 -0
- package/dist/vendors/_shared/install-builders.cjs +59 -0
- package/dist/vendors/_shared/install-builders.js +21 -0
- package/dist/vendors/_shared/script-url.cjs +78 -0
- package/dist/vendors/_shared/script-url.js +28 -0
- package/dist/{linkedin-insights.cjs → vendors/ads-and-pixels/linkedin-insights.cjs} +11 -7
- package/dist/{linkedin-insights.js → vendors/ads-and-pixels/linkedin-insights.js} +2 -2
- package/dist/vendors/ads-and-pixels/meta-pixel.cjs +206 -0
- package/dist/vendors/ads-and-pixels/meta-pixel.js +153 -0
- package/dist/{microsoft-uet.cjs → vendors/ads-and-pixels/microsoft-uet.cjs} +42 -21
- package/dist/{microsoft-uet.js → vendors/ads-and-pixels/microsoft-uet.js} +31 -14
- package/dist/vendors/ads-and-pixels/reddit-pixel.cjs +151 -0
- package/dist/vendors/ads-and-pixels/reddit-pixel.js +107 -0
- package/dist/vendors/ads-and-pixels/snapchat-pixel.cjs +131 -0
- package/dist/vendors/ads-and-pixels/snapchat-pixel.js +87 -0
- package/dist/{tiktok-pixel.cjs → vendors/ads-and-pixels/tiktok-pixel.cjs} +11 -7
- 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} +15 -8
- package/dist/{x-pixel.js → vendors/ads-and-pixels/x-pixel.js} +6 -3
- package/dist/vendors/analytics/adobe-analytics.cjs +90 -0
- package/dist/vendors/analytics/adobe-analytics.js +49 -0
- package/dist/vendors/analytics/ahrefs-analytics.cjs +68 -0
- package/dist/vendors/analytics/ahrefs-analytics.js +27 -0
- package/dist/vendors/analytics/amplitude.cjs +193 -0
- package/dist/vendors/analytics/amplitude.js +134 -0
- package/dist/vendors/analytics/clearbit.cjs +69 -0
- package/dist/vendors/analytics/clearbit.js +28 -0
- package/dist/vendors/analytics/cloudflare-web-analytics.cjs +73 -0
- package/dist/vendors/analytics/cloudflare-web-analytics.js +32 -0
- package/dist/{databuddy.cjs → vendors/analytics/databuddy.cjs} +14 -10
- package/dist/{databuddy.js → vendors/analytics/databuddy.js} +3 -3
- package/dist/vendors/analytics/fathom-analytics.cjs +76 -0
- package/dist/vendors/analytics/fathom-analytics.js +35 -0
- package/dist/{google-tag.cjs → vendors/analytics/google-tag.cjs} +18 -35
- package/dist/{google-tag.js → vendors/analytics/google-tag.js} +7 -28
- package/dist/vendors/analytics/heap.cjs +181 -0
- package/dist/vendors/analytics/heap.js +134 -0
- package/dist/vendors/analytics/hightouch.cjs +153 -0
- package/dist/vendors/analytics/hightouch.js +109 -0
- package/dist/vendors/analytics/hotjar.cjs +85 -0
- package/dist/vendors/analytics/hotjar.js +44 -0
- package/dist/vendors/analytics/logrocket.cjs +99 -0
- package/dist/vendors/analytics/logrocket.js +58 -0
- package/dist/vendors/analytics/matomo-analytics.cjs +232 -0
- package/dist/vendors/analytics/matomo-analytics.js +191 -0
- package/dist/vendors/analytics/microsoft-clarity.cjs +138 -0
- package/dist/vendors/analytics/microsoft-clarity.js +97 -0
- package/dist/vendors/analytics/mixpanel-analytics.cjs +134 -0
- package/dist/vendors/analytics/mixpanel-analytics.js +93 -0
- package/dist/vendors/analytics/pirsch.cjs +108 -0
- package/dist/vendors/analytics/pirsch.js +67 -0
- package/dist/vendors/analytics/plausible-analytics.cjs +122 -0
- package/dist/vendors/analytics/plausible-analytics.js +81 -0
- package/dist/vendors/analytics/posthog.cjs +204 -0
- package/dist/vendors/analytics/posthog.js +163 -0
- package/dist/vendors/analytics/promptwatch.cjs +70 -0
- package/dist/vendors/analytics/promptwatch.js +29 -0
- package/dist/vendors/analytics/rudderstack.cjs +227 -0
- package/dist/vendors/analytics/rudderstack.js +183 -0
- package/dist/vendors/analytics/rybbit-analytics.cjs +104 -0
- package/dist/vendors/analytics/rybbit-analytics.js +63 -0
- package/dist/vendors/analytics/segment.cjs +97 -0
- package/dist/vendors/analytics/segment.js +56 -0
- package/dist/vendors/analytics/umami-analytics.cjs +80 -0
- package/dist/vendors/analytics/umami-analytics.js +39 -0
- package/dist/vendors/analytics/vercel-analytics.cjs +94 -0
- package/dist/vendors/analytics/vercel-analytics.js +53 -0
- package/dist/vendors/functional/crisp.cjs +143 -0
- package/dist/vendors/functional/crisp.js +102 -0
- package/dist/vendors/functional/intercom.cjs +89 -0
- package/dist/vendors/functional/intercom.js +45 -0
- package/dist/{google-tag-manager.cjs → vendors/tag-managers/google-tag-manager.cjs} +17 -34
- 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 +440 -0
- package/dist-types/types.d.ts +53 -2
- 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/vendors/ads-and-pixels/linkedin-insights.d.ts +92 -0
- 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} +45 -34
- 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} +48 -33
- package/dist-types/{x-pixel.d.ts → vendors/ads-and-pixels/x-pixel.d.ts} +34 -17
- package/dist-types/vendors/analytics/adobe-analytics.d.ts +75 -0
- package/dist-types/vendors/analytics/ahrefs-analytics.d.ts +62 -0
- package/dist-types/vendors/analytics/amplitude.d.ts +234 -0
- package/dist-types/vendors/analytics/clearbit.d.ts +60 -0
- package/dist-types/vendors/analytics/cloudflare-web-analytics.d.ts +67 -0
- package/dist-types/{databuddy.d.ts → vendors/analytics/databuddy.d.ts} +25 -25
- package/dist-types/vendors/analytics/fathom-analytics.d.ts +90 -0
- package/dist-types/{google-tag.d.ts → vendors/analytics/google-tag.d.ts} +21 -24
- package/dist-types/vendors/analytics/heap.d.ts +316 -0
- package/dist-types/vendors/analytics/hightouch.d.ts +285 -0
- package/dist-types/vendors/analytics/hotjar.d.ts +73 -0
- package/dist-types/vendors/analytics/logrocket.d.ts +101 -0
- package/dist-types/vendors/analytics/matomo-analytics.d.ts +41 -0
- package/dist-types/vendors/analytics/microsoft-clarity.d.ts +98 -0
- package/dist-types/vendors/analytics/mixpanel-analytics.d.ts +113 -0
- package/dist-types/vendors/analytics/pirsch.d.ts +96 -0
- package/dist-types/vendors/analytics/plausible-analytics.d.ts +122 -0
- package/dist-types/vendors/analytics/posthog.d.ts +154 -0
- package/dist-types/vendors/analytics/promptwatch.d.ts +36 -0
- package/dist-types/vendors/analytics/rudderstack.d.ts +330 -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} +22 -25
- package/docs/README.md +62 -0
- package/docs/frameworks/javascript/script-loader.md +354 -0
- package/docs/frameworks/next/script-loader.md +499 -0
- package/docs/frameworks/react/script-loader.md +553 -0
- package/docs/integrations/adobe-analytics.md +160 -0
- package/docs/integrations/ahrefs-analytics.md +157 -0
- package/docs/integrations/amplitude.md +230 -0
- package/docs/integrations/building-integrations.md +239 -0
- package/docs/integrations/clearbit.md +130 -0
- package/docs/integrations/cloudflare-web-analytics.md +126 -0
- package/docs/integrations/crisp.md +140 -0
- package/docs/integrations/databuddy.md +205 -0
- package/docs/integrations/fathom-analytics.md +150 -0
- package/docs/integrations/google-maps.md +263 -0
- package/docs/integrations/google-tag-manager.md +154 -0
- package/docs/integrations/google-tag.md +134 -0
- package/docs/integrations/heap.md +219 -0
- package/docs/integrations/hightouch.md +199 -0
- package/docs/integrations/hotjar.md +143 -0
- package/docs/integrations/intercom.md +144 -0
- package/docs/integrations/linkedin-insights.md +161 -0
- package/docs/integrations/logrocket.md +175 -0
- package/docs/integrations/matomo-analytics.md +171 -0
- package/docs/integrations/meta-pixel.md +412 -0
- package/docs/integrations/microsoft-clarity.md +173 -0
- package/docs/integrations/microsoft-uet.md +156 -0
- package/docs/integrations/mixpanel-analytics.md +130 -0
- package/docs/integrations/overview.md +149 -0
- package/docs/integrations/pirsch.md +142 -0
- package/docs/integrations/plausible-analytics.md +154 -0
- package/docs/integrations/posthog.md +258 -0
- package/docs/integrations/promptwatch.md +121 -0
- package/docs/integrations/reddit-pixel.md +241 -0
- package/docs/integrations/rudderstack.md +271 -0
- package/docs/integrations/rybbit-analytics.md +143 -0
- package/docs/integrations/segment.md +146 -0
- package/docs/integrations/snapchat-pixel.md +163 -0
- package/docs/integrations/tiktok-pixel.md +123 -0
- package/docs/integrations/umami-analytics.md +148 -0
- package/docs/integrations/vercel-analytics.md +141 -0
- package/docs/integrations/x-pixel.md +157 -0
- package/docs/integrations/youtube.md +193 -0
- package/docs/shared/react/guides/script-loader.md +309 -0
- package/package.json +223 -8
- package/readme.json +8 -4
- package/dist/meta-pixel.cjs +0 -129
- package/dist/meta-pixel.js +0 -89
- package/dist/posthog.cjs +0 -137
- package/dist/posthog.js +0 -100
- package/dist-types/linkedin-insights.d.ts +0 -79
- package/dist-types/meta-pixel.d.ts +0 -185
- package/dist-types/posthog.d.ts +0 -112
package/dist/meta-pixel.cjs
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
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
|
-
metaPixelManifest: ()=>metaPixelManifest,
|
|
28
|
-
metaPixel: ()=>metaPixel,
|
|
29
|
-
metaPixelEvent: ()=>metaPixelEvent
|
|
30
|
-
});
|
|
31
|
-
const external_resolve_cjs_namespaceObject = require("./resolve.cjs");
|
|
32
|
-
const external_types_cjs_namespaceObject = require("./types.cjs");
|
|
33
|
-
const metaPixelManifest = {
|
|
34
|
-
...external_types_cjs_namespaceObject.vendorManifestContract,
|
|
35
|
-
vendor: 'meta-pixel',
|
|
36
|
-
category: 'marketing',
|
|
37
|
-
persistAfterConsentRevoked: true,
|
|
38
|
-
bootstrap: [
|
|
39
|
-
{
|
|
40
|
-
type: 'defineStubFunction',
|
|
41
|
-
name: 'fbq',
|
|
42
|
-
queue: {
|
|
43
|
-
property: 'queue'
|
|
44
|
-
},
|
|
45
|
-
dispatchProperty: 'callMethod',
|
|
46
|
-
selfReferences: [
|
|
47
|
-
'push'
|
|
48
|
-
],
|
|
49
|
-
aliases: [
|
|
50
|
-
'_fbq'
|
|
51
|
-
],
|
|
52
|
-
properties: {
|
|
53
|
-
loaded: true,
|
|
54
|
-
version: '2.0'
|
|
55
|
-
},
|
|
56
|
-
ifUndefined: true
|
|
57
|
-
}
|
|
58
|
-
],
|
|
59
|
-
install: [
|
|
60
|
-
{
|
|
61
|
-
type: 'callGlobal',
|
|
62
|
-
global: 'fbq',
|
|
63
|
-
args: [
|
|
64
|
-
'consent',
|
|
65
|
-
'grant'
|
|
66
|
-
]
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
type: 'callGlobal',
|
|
70
|
-
global: 'fbq',
|
|
71
|
-
args: [
|
|
72
|
-
'init',
|
|
73
|
-
'{{pixelId}}'
|
|
74
|
-
]
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
type: 'callGlobal',
|
|
78
|
-
global: 'fbq',
|
|
79
|
-
args: [
|
|
80
|
-
'track',
|
|
81
|
-
'PageView'
|
|
82
|
-
]
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
type: 'loadScript',
|
|
86
|
-
src: "{{scriptSrc}}",
|
|
87
|
-
async: true
|
|
88
|
-
}
|
|
89
|
-
],
|
|
90
|
-
onConsentGranted: [
|
|
91
|
-
{
|
|
92
|
-
type: 'callGlobal',
|
|
93
|
-
global: 'fbq',
|
|
94
|
-
args: [
|
|
95
|
-
'consent',
|
|
96
|
-
'grant'
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
],
|
|
100
|
-
onConsentDenied: [
|
|
101
|
-
{
|
|
102
|
-
type: 'callGlobal',
|
|
103
|
-
global: 'fbq',
|
|
104
|
-
args: [
|
|
105
|
-
'consent',
|
|
106
|
-
'revoke'
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
]
|
|
110
|
-
};
|
|
111
|
-
function metaPixel({ pixelId, scriptSrc }) {
|
|
112
|
-
const resolved = (0, external_resolve_cjs_namespaceObject.resolveManifest)(metaPixelManifest, {
|
|
113
|
-
pixelId,
|
|
114
|
-
scriptSrc: scriptSrc ?? 'https://connect.facebook.net/en_US/fbevents.js'
|
|
115
|
-
});
|
|
116
|
-
return resolved;
|
|
117
|
-
}
|
|
118
|
-
const metaPixelEvent = (eventName, params, eventId)=>window.fbq('track', eventName, params, eventId);
|
|
119
|
-
exports.metaPixel = __webpack_exports__.metaPixel;
|
|
120
|
-
exports.metaPixelEvent = __webpack_exports__.metaPixelEvent;
|
|
121
|
-
exports.metaPixelManifest = __webpack_exports__.metaPixelManifest;
|
|
122
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
123
|
-
"metaPixel",
|
|
124
|
-
"metaPixelEvent",
|
|
125
|
-
"metaPixelManifest"
|
|
126
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
127
|
-
Object.defineProperty(exports, '__esModule', {
|
|
128
|
-
value: true
|
|
129
|
-
});
|
package/dist/meta-pixel.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { resolveManifest } from "./resolve.js";
|
|
2
|
-
import { vendorManifestContract } from "./types.js";
|
|
3
|
-
const metaPixelManifest = {
|
|
4
|
-
...vendorManifestContract,
|
|
5
|
-
vendor: 'meta-pixel',
|
|
6
|
-
category: 'marketing',
|
|
7
|
-
persistAfterConsentRevoked: true,
|
|
8
|
-
bootstrap: [
|
|
9
|
-
{
|
|
10
|
-
type: 'defineStubFunction',
|
|
11
|
-
name: 'fbq',
|
|
12
|
-
queue: {
|
|
13
|
-
property: 'queue'
|
|
14
|
-
},
|
|
15
|
-
dispatchProperty: 'callMethod',
|
|
16
|
-
selfReferences: [
|
|
17
|
-
'push'
|
|
18
|
-
],
|
|
19
|
-
aliases: [
|
|
20
|
-
'_fbq'
|
|
21
|
-
],
|
|
22
|
-
properties: {
|
|
23
|
-
loaded: true,
|
|
24
|
-
version: '2.0'
|
|
25
|
-
},
|
|
26
|
-
ifUndefined: true
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
install: [
|
|
30
|
-
{
|
|
31
|
-
type: 'callGlobal',
|
|
32
|
-
global: 'fbq',
|
|
33
|
-
args: [
|
|
34
|
-
'consent',
|
|
35
|
-
'grant'
|
|
36
|
-
]
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
type: 'callGlobal',
|
|
40
|
-
global: 'fbq',
|
|
41
|
-
args: [
|
|
42
|
-
'init',
|
|
43
|
-
'{{pixelId}}'
|
|
44
|
-
]
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
type: 'callGlobal',
|
|
48
|
-
global: 'fbq',
|
|
49
|
-
args: [
|
|
50
|
-
'track',
|
|
51
|
-
'PageView'
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
type: 'loadScript',
|
|
56
|
-
src: "{{scriptSrc}}",
|
|
57
|
-
async: true
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
onConsentGranted: [
|
|
61
|
-
{
|
|
62
|
-
type: 'callGlobal',
|
|
63
|
-
global: 'fbq',
|
|
64
|
-
args: [
|
|
65
|
-
'consent',
|
|
66
|
-
'grant'
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
onConsentDenied: [
|
|
71
|
-
{
|
|
72
|
-
type: 'callGlobal',
|
|
73
|
-
global: 'fbq',
|
|
74
|
-
args: [
|
|
75
|
-
'consent',
|
|
76
|
-
'revoke'
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
]
|
|
80
|
-
};
|
|
81
|
-
function metaPixel({ pixelId, scriptSrc }) {
|
|
82
|
-
const resolved = resolveManifest(metaPixelManifest, {
|
|
83
|
-
pixelId,
|
|
84
|
-
scriptSrc: scriptSrc ?? 'https://connect.facebook.net/en_US/fbevents.js'
|
|
85
|
-
});
|
|
86
|
-
return resolved;
|
|
87
|
-
}
|
|
88
|
-
const metaPixelEvent = (eventName, params, eventId)=>window.fbq('track', eventName, params, eventId);
|
|
89
|
-
export { metaPixel, metaPixelEvent, metaPixelManifest };
|
package/dist/posthog.cjs
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
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
|
-
posthogManifest: ()=>posthogManifest,
|
|
28
|
-
posthog: ()=>posthog
|
|
29
|
-
});
|
|
30
|
-
const external_resolve_cjs_namespaceObject = require("./resolve.cjs");
|
|
31
|
-
const external_types_cjs_namespaceObject = require("./types.cjs");
|
|
32
|
-
const posthogManifest = {
|
|
33
|
-
...external_types_cjs_namespaceObject.vendorManifestContract,
|
|
34
|
-
vendor: 'posthog',
|
|
35
|
-
category: 'measurement',
|
|
36
|
-
alwaysLoad: true,
|
|
37
|
-
bootstrap: [
|
|
38
|
-
{
|
|
39
|
-
type: 'setGlobal',
|
|
40
|
-
name: 'posthog',
|
|
41
|
-
value: {},
|
|
42
|
-
ifUndefined: true
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
type: 'defineGlobalMethods',
|
|
46
|
-
target: 'posthog',
|
|
47
|
-
methods: [
|
|
48
|
-
{
|
|
49
|
-
name: 'init',
|
|
50
|
-
behavior: 'noop'
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
name: 'opt_in_capturing',
|
|
54
|
-
behavior: 'noop'
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
name: 'opt_out_capturing',
|
|
58
|
-
behavior: 'noop'
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
name: 'get_explicit_consent_status',
|
|
62
|
-
behavior: 'return',
|
|
63
|
-
value: 'pending'
|
|
64
|
-
}
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
],
|
|
68
|
-
install: [
|
|
69
|
-
{
|
|
70
|
-
type: 'loadScript',
|
|
71
|
-
src: "{{scriptUrl}}",
|
|
72
|
-
async: true,
|
|
73
|
-
attributes: {
|
|
74
|
-
crossorigin: 'anonymous',
|
|
75
|
-
'data-api-host': '{{apiHost}}',
|
|
76
|
-
'data-ui-host': '{{apiHost}}'
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
afterLoad: [
|
|
81
|
-
{
|
|
82
|
-
type: 'callGlobal',
|
|
83
|
-
global: 'posthog',
|
|
84
|
-
method: 'init',
|
|
85
|
-
args: [
|
|
86
|
-
'{{id}}',
|
|
87
|
-
'{{initOptions}}'
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
],
|
|
91
|
-
onLoadGranted: [
|
|
92
|
-
{
|
|
93
|
-
type: 'callGlobal',
|
|
94
|
-
global: 'posthog',
|
|
95
|
-
method: 'opt_in_capturing'
|
|
96
|
-
}
|
|
97
|
-
],
|
|
98
|
-
onLoadDenied: [
|
|
99
|
-
{
|
|
100
|
-
type: 'callGlobal',
|
|
101
|
-
global: 'posthog',
|
|
102
|
-
method: 'opt_out_capturing'
|
|
103
|
-
}
|
|
104
|
-
],
|
|
105
|
-
onConsentGranted: [
|
|
106
|
-
{
|
|
107
|
-
type: 'callGlobal',
|
|
108
|
-
global: 'posthog',
|
|
109
|
-
method: 'opt_in_capturing'
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
onConsentDenied: [
|
|
113
|
-
{
|
|
114
|
-
type: 'callGlobal',
|
|
115
|
-
global: 'posthog',
|
|
116
|
-
method: 'opt_out_capturing'
|
|
117
|
-
}
|
|
118
|
-
]
|
|
119
|
-
};
|
|
120
|
-
function posthog(options) {
|
|
121
|
-
const resolved = (0, external_resolve_cjs_namespaceObject.resolveManifest)(posthogManifest, {
|
|
122
|
-
id: options.id,
|
|
123
|
-
apiHost: options.apiHost ?? 'https://eu.i.posthog.com',
|
|
124
|
-
scriptUrl: options.scriptUrl ?? 'https://eu-assets.i.posthog.com/static/array.js',
|
|
125
|
-
initOptions: options.initOptions ?? {}
|
|
126
|
-
});
|
|
127
|
-
return resolved;
|
|
128
|
-
}
|
|
129
|
-
exports.posthog = __webpack_exports__.posthog;
|
|
130
|
-
exports.posthogManifest = __webpack_exports__.posthogManifest;
|
|
131
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
132
|
-
"posthog",
|
|
133
|
-
"posthogManifest"
|
|
134
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
135
|
-
Object.defineProperty(exports, '__esModule', {
|
|
136
|
-
value: true
|
|
137
|
-
});
|
package/dist/posthog.js
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { resolveManifest } from "./resolve.js";
|
|
2
|
-
import { vendorManifestContract } from "./types.js";
|
|
3
|
-
const posthogManifest = {
|
|
4
|
-
...vendorManifestContract,
|
|
5
|
-
vendor: 'posthog',
|
|
6
|
-
category: 'measurement',
|
|
7
|
-
alwaysLoad: true,
|
|
8
|
-
bootstrap: [
|
|
9
|
-
{
|
|
10
|
-
type: 'setGlobal',
|
|
11
|
-
name: 'posthog',
|
|
12
|
-
value: {},
|
|
13
|
-
ifUndefined: true
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
type: 'defineGlobalMethods',
|
|
17
|
-
target: 'posthog',
|
|
18
|
-
methods: [
|
|
19
|
-
{
|
|
20
|
-
name: 'init',
|
|
21
|
-
behavior: 'noop'
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
name: 'opt_in_capturing',
|
|
25
|
-
behavior: 'noop'
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: 'opt_out_capturing',
|
|
29
|
-
behavior: 'noop'
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
name: 'get_explicit_consent_status',
|
|
33
|
-
behavior: 'return',
|
|
34
|
-
value: 'pending'
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
],
|
|
39
|
-
install: [
|
|
40
|
-
{
|
|
41
|
-
type: 'loadScript',
|
|
42
|
-
src: "{{scriptUrl}}",
|
|
43
|
-
async: true,
|
|
44
|
-
attributes: {
|
|
45
|
-
crossorigin: 'anonymous',
|
|
46
|
-
'data-api-host': '{{apiHost}}',
|
|
47
|
-
'data-ui-host': '{{apiHost}}'
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
|
-
afterLoad: [
|
|
52
|
-
{
|
|
53
|
-
type: 'callGlobal',
|
|
54
|
-
global: 'posthog',
|
|
55
|
-
method: 'init',
|
|
56
|
-
args: [
|
|
57
|
-
'{{id}}',
|
|
58
|
-
'{{initOptions}}'
|
|
59
|
-
]
|
|
60
|
-
}
|
|
61
|
-
],
|
|
62
|
-
onLoadGranted: [
|
|
63
|
-
{
|
|
64
|
-
type: 'callGlobal',
|
|
65
|
-
global: 'posthog',
|
|
66
|
-
method: 'opt_in_capturing'
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
onLoadDenied: [
|
|
70
|
-
{
|
|
71
|
-
type: 'callGlobal',
|
|
72
|
-
global: 'posthog',
|
|
73
|
-
method: 'opt_out_capturing'
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
onConsentGranted: [
|
|
77
|
-
{
|
|
78
|
-
type: 'callGlobal',
|
|
79
|
-
global: 'posthog',
|
|
80
|
-
method: 'opt_in_capturing'
|
|
81
|
-
}
|
|
82
|
-
],
|
|
83
|
-
onConsentDenied: [
|
|
84
|
-
{
|
|
85
|
-
type: 'callGlobal',
|
|
86
|
-
global: 'posthog',
|
|
87
|
-
method: 'opt_out_capturing'
|
|
88
|
-
}
|
|
89
|
-
]
|
|
90
|
-
};
|
|
91
|
-
function posthog(options) {
|
|
92
|
-
const resolved = resolveManifest(posthogManifest, {
|
|
93
|
-
id: options.id,
|
|
94
|
-
apiHost: options.apiHost ?? 'https://eu.i.posthog.com',
|
|
95
|
-
scriptUrl: options.scriptUrl ?? 'https://eu-assets.i.posthog.com/static/array.js',
|
|
96
|
-
initOptions: options.initOptions ?? {}
|
|
97
|
-
});
|
|
98
|
-
return resolved;
|
|
99
|
-
}
|
|
100
|
-
export { posthog, posthogManifest };
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import type { Script } from 'c15t';
|
|
2
|
-
declare global {
|
|
3
|
-
interface Window {
|
|
4
|
-
lintrk: ((...args: unknown[]) => void) & {
|
|
5
|
-
q?: unknown[][];
|
|
6
|
-
};
|
|
7
|
-
_linkedin_partner_id?: string;
|
|
8
|
-
_linkedin_data_partner_ids?: string[];
|
|
9
|
-
ORIBILI?: {
|
|
10
|
-
_DEBUG?: {
|
|
11
|
-
disableScript?: () => void;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* LinkedIn Insights vendor manifest.
|
|
18
|
-
*
|
|
19
|
-
* Sets up the LinkedIn partner ID globals and loads the insights script
|
|
20
|
-
* via structured startup steps.
|
|
21
|
-
*/
|
|
22
|
-
export declare const linkedinInsightsManifest: {
|
|
23
|
-
readonly vendor: "linkedin-insights";
|
|
24
|
-
readonly category: "marketing";
|
|
25
|
-
readonly install: [{
|
|
26
|
-
readonly type: "setGlobal";
|
|
27
|
-
readonly name: "_linkedin_partner_id";
|
|
28
|
-
readonly value: "{{id}}";
|
|
29
|
-
readonly ifUndefined: false;
|
|
30
|
-
}, {
|
|
31
|
-
readonly type: "setGlobal";
|
|
32
|
-
readonly name: "_linkedin_data_partner_ids";
|
|
33
|
-
readonly value: readonly [];
|
|
34
|
-
readonly ifUndefined: true;
|
|
35
|
-
}, {
|
|
36
|
-
readonly type: "pushToQueue";
|
|
37
|
-
readonly queue: "_linkedin_data_partner_ids";
|
|
38
|
-
readonly value: "{{id}}";
|
|
39
|
-
}, {
|
|
40
|
-
readonly type: "defineStubFunction";
|
|
41
|
-
readonly name: "lintrk";
|
|
42
|
-
readonly queue: {
|
|
43
|
-
readonly property: "q";
|
|
44
|
-
};
|
|
45
|
-
readonly queueFormat: "array";
|
|
46
|
-
readonly ifUndefined: true;
|
|
47
|
-
}, {
|
|
48
|
-
readonly type: "loadScript";
|
|
49
|
-
readonly src: "{{scriptSrc}}";
|
|
50
|
-
readonly async: true;
|
|
51
|
-
}];
|
|
52
|
-
readonly kind: "c15t.vendor-manifest";
|
|
53
|
-
readonly schemaVersion: 1;
|
|
54
|
-
};
|
|
55
|
-
export interface LinkedInInsightsOptions {
|
|
56
|
-
/**
|
|
57
|
-
* Your LinkedIn Insights ID
|
|
58
|
-
* @example `123456789012345`
|
|
59
|
-
*/
|
|
60
|
-
id: string;
|
|
61
|
-
/** LinkedIn Insights loader URL. */
|
|
62
|
-
scriptSrc?: string;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* LinkedIn Insights Script
|
|
66
|
-
*
|
|
67
|
-
* @param options - The options for the LinkedIn Insights script
|
|
68
|
-
* @returns The LinkedIn Insights script configuration
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* ```ts
|
|
72
|
-
* const linkedinInsightsScript = linkedinInsights({
|
|
73
|
-
* id: '123456789012345',
|
|
74
|
-
* });
|
|
75
|
-
* ```
|
|
76
|
-
*
|
|
77
|
-
* @see {@link https://business.linkedin.com/marketing-solutions/ad-libraries/insights} LinkedIn Insights documentation
|
|
78
|
-
*/
|
|
79
|
-
export declare function linkedinInsights({ id, scriptSrc, }: LinkedInInsightsOptions): Script;
|