@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
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { resolveManifest } from "../../resolve.js";
|
|
2
|
+
import { vendorManifestContract } from "../../types.js";
|
|
3
|
+
import { joinUrlPath, resolveScriptUrl, trimToUndefined } from "../_shared/script-url.js";
|
|
4
|
+
const DEFAULT_HEAP_CONFIG_BASE_URL = 'https://cdn.us.heap-api.com/config';
|
|
5
|
+
const HEAP_QUEUE_METHODS = [
|
|
6
|
+
'init',
|
|
7
|
+
'startTracking',
|
|
8
|
+
'stopTracking',
|
|
9
|
+
'track',
|
|
10
|
+
'resetIdentity',
|
|
11
|
+
'identify',
|
|
12
|
+
'identifyHashed',
|
|
13
|
+
'getSessionId',
|
|
14
|
+
'getUserId',
|
|
15
|
+
'getIdentity',
|
|
16
|
+
'addUserProperties',
|
|
17
|
+
'addEventProperties',
|
|
18
|
+
'removeEventProperty',
|
|
19
|
+
'clearEventProperties',
|
|
20
|
+
'addAccountProperties',
|
|
21
|
+
'addAdapter',
|
|
22
|
+
'addTransformer',
|
|
23
|
+
'addTransformerFn',
|
|
24
|
+
'onReady',
|
|
25
|
+
'addPageviewProperties',
|
|
26
|
+
'removePageviewProperty',
|
|
27
|
+
'clearPageviewProperties',
|
|
28
|
+
'trackPageview'
|
|
29
|
+
];
|
|
30
|
+
const heapManifest = {
|
|
31
|
+
...vendorManifestContract,
|
|
32
|
+
vendor: 'heap',
|
|
33
|
+
category: 'measurement',
|
|
34
|
+
install: [
|
|
35
|
+
{
|
|
36
|
+
type: 'setGlobal',
|
|
37
|
+
name: 'heapReadyCb',
|
|
38
|
+
value: [],
|
|
39
|
+
ifUndefined: true
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
type: 'setGlobal',
|
|
43
|
+
name: 'heap',
|
|
44
|
+
value: [],
|
|
45
|
+
ifUndefined: true
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
type: 'setGlobalPath',
|
|
49
|
+
path: [
|
|
50
|
+
'heap',
|
|
51
|
+
'envId'
|
|
52
|
+
],
|
|
53
|
+
value: '{{envId}}'
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
type: 'setGlobalPath',
|
|
57
|
+
path: [
|
|
58
|
+
'heap',
|
|
59
|
+
'appid'
|
|
60
|
+
],
|
|
61
|
+
value: '{{envId}}'
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
type: 'setGlobalPath',
|
|
65
|
+
path: [
|
|
66
|
+
'heap',
|
|
67
|
+
'clientConfig'
|
|
68
|
+
],
|
|
69
|
+
value: '{{clientConfig}}'
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: 'defineQueueMethods',
|
|
73
|
+
target: 'heap',
|
|
74
|
+
queue: {
|
|
75
|
+
global: 'heapReadyCb'
|
|
76
|
+
},
|
|
77
|
+
queueFormat: 'callback',
|
|
78
|
+
methods: [
|
|
79
|
+
...HEAP_QUEUE_METHODS
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
type: 'loadScript',
|
|
84
|
+
src: "{{scriptUrl}}",
|
|
85
|
+
async: true
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
};
|
|
89
|
+
function validateEnvId(envId) {
|
|
90
|
+
const normalized = 'string' == typeof envId ? envId.trim() : '';
|
|
91
|
+
if (0 === normalized.length) throw new Error('heap: missing or invalid envId');
|
|
92
|
+
return normalized;
|
|
93
|
+
}
|
|
94
|
+
function isPlainRecord(value) {
|
|
95
|
+
if (null === value || 'object' != typeof value || Array.isArray(value)) return false;
|
|
96
|
+
const prototype = Object.getPrototypeOf(value);
|
|
97
|
+
return prototype === Object.prototype || null === prototype;
|
|
98
|
+
}
|
|
99
|
+
function toJsonValue(value, path) {
|
|
100
|
+
if (null === value) return null;
|
|
101
|
+
if ('string' == typeof value || 'boolean' == typeof value) return value;
|
|
102
|
+
if ('number' == typeof value) {
|
|
103
|
+
if (Number.isFinite(value)) return value;
|
|
104
|
+
throw new TypeError(`heap: clientConfig${path ? `.${path}` : ''} must be a finite number`);
|
|
105
|
+
}
|
|
106
|
+
if (Array.isArray(value)) return value.map((item, index)=>toJsonValue(item, `${path}[${index}]`));
|
|
107
|
+
if (isPlainRecord(value)) {
|
|
108
|
+
const result = {};
|
|
109
|
+
for (const [key, nestedValue] of Object.entries(value))result[key] = toJsonValue(nestedValue, path ? `${path}.${key}` : key);
|
|
110
|
+
return result;
|
|
111
|
+
}
|
|
112
|
+
throw new TypeError(`heap: clientConfig${path ? `.${path}` : ''} must be JSON-serializable`);
|
|
113
|
+
}
|
|
114
|
+
function normalizeClientConfig(clientConfig) {
|
|
115
|
+
const config = clientConfig ?? {};
|
|
116
|
+
const normalized = toJsonValue(config, '');
|
|
117
|
+
if (!isPlainRecord(normalized)) throw new TypeError('heap: clientConfig must be a plain object');
|
|
118
|
+
return {
|
|
119
|
+
...normalized,
|
|
120
|
+
shouldFetchServerConfig: false
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
function resolveHeapScriptUrl(envId, scriptUrl) {
|
|
124
|
+
return resolveScriptUrl(trimToUndefined(scriptUrl), joinUrlPath(DEFAULT_HEAP_CONFIG_BASE_URL, `${envId}/heap_config.js`));
|
|
125
|
+
}
|
|
126
|
+
function heap({ envId, clientConfig, scriptUrl }) {
|
|
127
|
+
const normalizedEnvId = validateEnvId(envId);
|
|
128
|
+
return resolveManifest(heapManifest, {
|
|
129
|
+
envId: normalizedEnvId,
|
|
130
|
+
clientConfig: normalizeClientConfig(clientConfig),
|
|
131
|
+
scriptUrl: resolveHeapScriptUrl(normalizedEnvId, scriptUrl)
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
export { DEFAULT_HEAP_CONFIG_BASE_URL, HEAP_QUEUE_METHODS, heap, heapManifest };
|
|
@@ -0,0 +1,153 @@
|
|
|
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
|
+
HIGHTOUCH_QUEUE_METHODS: ()=>HIGHTOUCH_QUEUE_METHODS,
|
|
32
|
+
hightouch: ()=>hightouch,
|
|
33
|
+
hightouchManifest: ()=>hightouchManifest
|
|
34
|
+
});
|
|
35
|
+
const external_resolve_cjs_namespaceObject = require("../../resolve.cjs");
|
|
36
|
+
const external_types_cjs_namespaceObject = require("../../types.cjs");
|
|
37
|
+
const script_url_cjs_namespaceObject = require("../_shared/script-url.cjs");
|
|
38
|
+
const DEFAULT_HIGHTOUCH_SCRIPT_URL = 'https://cdn.hightouch-events.com/browser/release/v1-latest/events.min.js';
|
|
39
|
+
const HIGHTOUCH_QUEUE_METHODS = [
|
|
40
|
+
'trackSubmit',
|
|
41
|
+
'trackClick',
|
|
42
|
+
'trackLink',
|
|
43
|
+
'trackForm',
|
|
44
|
+
'pageview',
|
|
45
|
+
'identify',
|
|
46
|
+
'reset',
|
|
47
|
+
'group',
|
|
48
|
+
'track',
|
|
49
|
+
'ready',
|
|
50
|
+
'alias',
|
|
51
|
+
'debug',
|
|
52
|
+
'page',
|
|
53
|
+
'once',
|
|
54
|
+
'off',
|
|
55
|
+
'on',
|
|
56
|
+
'addSourceMiddleware',
|
|
57
|
+
'addIntegrationMiddleware',
|
|
58
|
+
'setAnonymousId',
|
|
59
|
+
'addDestinationMiddleware',
|
|
60
|
+
'load'
|
|
61
|
+
];
|
|
62
|
+
const hightouchManifest = {
|
|
63
|
+
...external_types_cjs_namespaceObject.vendorManifestContract,
|
|
64
|
+
vendor: 'hightouch',
|
|
65
|
+
category: 'measurement',
|
|
66
|
+
bootstrap: [
|
|
67
|
+
{
|
|
68
|
+
type: 'setGlobal',
|
|
69
|
+
name: 'htevents',
|
|
70
|
+
value: [],
|
|
71
|
+
ifUndefined: true
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
type: 'defineQueueMethods',
|
|
75
|
+
target: 'htevents',
|
|
76
|
+
methods: [
|
|
77
|
+
...HIGHTOUCH_QUEUE_METHODS
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
type: 'setGlobalPath',
|
|
82
|
+
path: [
|
|
83
|
+
'htevents',
|
|
84
|
+
'_writeKey'
|
|
85
|
+
],
|
|
86
|
+
value: '{{writeKey}}'
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
type: 'setGlobalPath',
|
|
90
|
+
path: [
|
|
91
|
+
'htevents',
|
|
92
|
+
'_loadOptions'
|
|
93
|
+
],
|
|
94
|
+
value: '{{loadOptions}}'
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
install: [
|
|
98
|
+
{
|
|
99
|
+
type: 'callGlobal',
|
|
100
|
+
global: 'htevents',
|
|
101
|
+
method: 'load',
|
|
102
|
+
args: [
|
|
103
|
+
'{{writeKey}}',
|
|
104
|
+
'{{loadOptions}}'
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
type: 'callGlobal',
|
|
109
|
+
global: 'htevents',
|
|
110
|
+
method: 'page'
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
type: 'loadScript',
|
|
114
|
+
src: "{{scriptUrl}}",
|
|
115
|
+
async: true
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
};
|
|
119
|
+
function validateWriteKey(writeKey) {
|
|
120
|
+
const normalized = 'string' == typeof writeKey ? writeKey.trim() : '';
|
|
121
|
+
if (0 === normalized.length) throw new Error('hightouch: missing or invalid writeKey');
|
|
122
|
+
return normalized;
|
|
123
|
+
}
|
|
124
|
+
function normalizeApiHost(apiHost) {
|
|
125
|
+
return (0, script_url_cjs_namespaceObject.trimToUndefined)(apiHost);
|
|
126
|
+
}
|
|
127
|
+
function hightouch({ writeKey, apiHost, trackPageView = true, scriptUrl }) {
|
|
128
|
+
const normalizedWriteKey = validateWriteKey(writeKey);
|
|
129
|
+
const loadOptions = {
|
|
130
|
+
apiHost: normalizeApiHost(apiHost)
|
|
131
|
+
};
|
|
132
|
+
let manifest = hightouchManifest;
|
|
133
|
+
if (!trackPageView) manifest = {
|
|
134
|
+
...hightouchManifest,
|
|
135
|
+
install: hightouchManifest.install.filter((step)=>!('callGlobal' === step.type && 'htevents' === step.global && 'page' === step.method))
|
|
136
|
+
};
|
|
137
|
+
return (0, external_resolve_cjs_namespaceObject.resolveManifest)(manifest, {
|
|
138
|
+
loadOptions,
|
|
139
|
+
writeKey: normalizedWriteKey,
|
|
140
|
+
scriptUrl: (0, script_url_cjs_namespaceObject.resolveScriptUrl)((0, script_url_cjs_namespaceObject.trimToUndefined)(scriptUrl), DEFAULT_HIGHTOUCH_SCRIPT_URL)
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
exports.HIGHTOUCH_QUEUE_METHODS = __webpack_exports__.HIGHTOUCH_QUEUE_METHODS;
|
|
144
|
+
exports.hightouch = __webpack_exports__.hightouch;
|
|
145
|
+
exports.hightouchManifest = __webpack_exports__.hightouchManifest;
|
|
146
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
147
|
+
"HIGHTOUCH_QUEUE_METHODS",
|
|
148
|
+
"hightouch",
|
|
149
|
+
"hightouchManifest"
|
|
150
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
151
|
+
Object.defineProperty(exports, '__esModule', {
|
|
152
|
+
value: true
|
|
153
|
+
});
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { resolveManifest } from "../../resolve.js";
|
|
2
|
+
import { vendorManifestContract } from "../../types.js";
|
|
3
|
+
import { resolveScriptUrl, trimToUndefined } from "../_shared/script-url.js";
|
|
4
|
+
const DEFAULT_HIGHTOUCH_SCRIPT_URL = 'https://cdn.hightouch-events.com/browser/release/v1-latest/events.min.js';
|
|
5
|
+
const HIGHTOUCH_QUEUE_METHODS = [
|
|
6
|
+
'trackSubmit',
|
|
7
|
+
'trackClick',
|
|
8
|
+
'trackLink',
|
|
9
|
+
'trackForm',
|
|
10
|
+
'pageview',
|
|
11
|
+
'identify',
|
|
12
|
+
'reset',
|
|
13
|
+
'group',
|
|
14
|
+
'track',
|
|
15
|
+
'ready',
|
|
16
|
+
'alias',
|
|
17
|
+
'debug',
|
|
18
|
+
'page',
|
|
19
|
+
'once',
|
|
20
|
+
'off',
|
|
21
|
+
'on',
|
|
22
|
+
'addSourceMiddleware',
|
|
23
|
+
'addIntegrationMiddleware',
|
|
24
|
+
'setAnonymousId',
|
|
25
|
+
'addDestinationMiddleware',
|
|
26
|
+
'load'
|
|
27
|
+
];
|
|
28
|
+
const hightouchManifest = {
|
|
29
|
+
...vendorManifestContract,
|
|
30
|
+
vendor: 'hightouch',
|
|
31
|
+
category: 'measurement',
|
|
32
|
+
bootstrap: [
|
|
33
|
+
{
|
|
34
|
+
type: 'setGlobal',
|
|
35
|
+
name: 'htevents',
|
|
36
|
+
value: [],
|
|
37
|
+
ifUndefined: true
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
type: 'defineQueueMethods',
|
|
41
|
+
target: 'htevents',
|
|
42
|
+
methods: [
|
|
43
|
+
...HIGHTOUCH_QUEUE_METHODS
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: 'setGlobalPath',
|
|
48
|
+
path: [
|
|
49
|
+
'htevents',
|
|
50
|
+
'_writeKey'
|
|
51
|
+
],
|
|
52
|
+
value: '{{writeKey}}'
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
type: 'setGlobalPath',
|
|
56
|
+
path: [
|
|
57
|
+
'htevents',
|
|
58
|
+
'_loadOptions'
|
|
59
|
+
],
|
|
60
|
+
value: '{{loadOptions}}'
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
install: [
|
|
64
|
+
{
|
|
65
|
+
type: 'callGlobal',
|
|
66
|
+
global: 'htevents',
|
|
67
|
+
method: 'load',
|
|
68
|
+
args: [
|
|
69
|
+
'{{writeKey}}',
|
|
70
|
+
'{{loadOptions}}'
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
type: 'callGlobal',
|
|
75
|
+
global: 'htevents',
|
|
76
|
+
method: 'page'
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
type: 'loadScript',
|
|
80
|
+
src: "{{scriptUrl}}",
|
|
81
|
+
async: true
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
};
|
|
85
|
+
function validateWriteKey(writeKey) {
|
|
86
|
+
const normalized = 'string' == typeof writeKey ? writeKey.trim() : '';
|
|
87
|
+
if (0 === normalized.length) throw new Error('hightouch: missing or invalid writeKey');
|
|
88
|
+
return normalized;
|
|
89
|
+
}
|
|
90
|
+
function normalizeApiHost(apiHost) {
|
|
91
|
+
return trimToUndefined(apiHost);
|
|
92
|
+
}
|
|
93
|
+
function hightouch({ writeKey, apiHost, trackPageView = true, scriptUrl }) {
|
|
94
|
+
const normalizedWriteKey = validateWriteKey(writeKey);
|
|
95
|
+
const loadOptions = {
|
|
96
|
+
apiHost: normalizeApiHost(apiHost)
|
|
97
|
+
};
|
|
98
|
+
let manifest = hightouchManifest;
|
|
99
|
+
if (!trackPageView) manifest = {
|
|
100
|
+
...hightouchManifest,
|
|
101
|
+
install: hightouchManifest.install.filter((step)=>!('callGlobal' === step.type && 'htevents' === step.global && 'page' === step.method))
|
|
102
|
+
};
|
|
103
|
+
return resolveManifest(manifest, {
|
|
104
|
+
loadOptions,
|
|
105
|
+
writeKey: normalizedWriteKey,
|
|
106
|
+
scriptUrl: resolveScriptUrl(trimToUndefined(scriptUrl), DEFAULT_HIGHTOUCH_SCRIPT_URL)
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
export { HIGHTOUCH_QUEUE_METHODS, hightouch, hightouchManifest };
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
hotjar: ()=>hotjar,
|
|
32
|
+
hotjarManifest: ()=>hotjarManifest
|
|
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 hotjarManifest = {
|
|
38
|
+
...external_types_cjs_namespaceObject.vendorManifestContract,
|
|
39
|
+
vendor: 'hotjar',
|
|
40
|
+
category: 'measurement',
|
|
41
|
+
install: [
|
|
42
|
+
{
|
|
43
|
+
type: 'setGlobal',
|
|
44
|
+
name: '_hjSettings',
|
|
45
|
+
value: {
|
|
46
|
+
hjid: '{{siteId}}',
|
|
47
|
+
hjsv: '{{version}}'
|
|
48
|
+
},
|
|
49
|
+
ifUndefined: true
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
type: 'defineStubFunction',
|
|
53
|
+
name: 'hj',
|
|
54
|
+
queue: {
|
|
55
|
+
property: 'q'
|
|
56
|
+
},
|
|
57
|
+
queueFormat: 'array',
|
|
58
|
+
ifUndefined: true
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
type: 'loadScript',
|
|
62
|
+
src: "{{scriptUrl}}",
|
|
63
|
+
async: true
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
};
|
|
67
|
+
function hotjar({ siteId, version = 6, scriptUrl }) {
|
|
68
|
+
if (null == siteId) throw new Error('hotjar: missing or invalid siteId');
|
|
69
|
+
const normalizedSiteId = String(siteId).trim();
|
|
70
|
+
if (0 === normalizedSiteId.length || '0' === normalizedSiteId) throw new Error('hotjar: missing or invalid siteId');
|
|
71
|
+
return (0, external_resolve_cjs_namespaceObject.resolveManifest)(hotjarManifest, {
|
|
72
|
+
siteId: normalizedSiteId,
|
|
73
|
+
version,
|
|
74
|
+
scriptUrl: (0, script_url_cjs_namespaceObject.resolveScriptUrl)(scriptUrl, `https://static.hotjar.com/c/hotjar-${normalizedSiteId}.js?sv=${version}`)
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
exports.hotjar = __webpack_exports__.hotjar;
|
|
78
|
+
exports.hotjarManifest = __webpack_exports__.hotjarManifest;
|
|
79
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
80
|
+
"hotjar",
|
|
81
|
+
"hotjarManifest"
|
|
82
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
83
|
+
Object.defineProperty(exports, '__esModule', {
|
|
84
|
+
value: true
|
|
85
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { resolveManifest } from "../../resolve.js";
|
|
2
|
+
import { vendorManifestContract } from "../../types.js";
|
|
3
|
+
import { resolveScriptUrl } from "../_shared/script-url.js";
|
|
4
|
+
const hotjarManifest = {
|
|
5
|
+
...vendorManifestContract,
|
|
6
|
+
vendor: 'hotjar',
|
|
7
|
+
category: 'measurement',
|
|
8
|
+
install: [
|
|
9
|
+
{
|
|
10
|
+
type: 'setGlobal',
|
|
11
|
+
name: '_hjSettings',
|
|
12
|
+
value: {
|
|
13
|
+
hjid: '{{siteId}}',
|
|
14
|
+
hjsv: '{{version}}'
|
|
15
|
+
},
|
|
16
|
+
ifUndefined: true
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
type: 'defineStubFunction',
|
|
20
|
+
name: 'hj',
|
|
21
|
+
queue: {
|
|
22
|
+
property: 'q'
|
|
23
|
+
},
|
|
24
|
+
queueFormat: 'array',
|
|
25
|
+
ifUndefined: true
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: 'loadScript',
|
|
29
|
+
src: "{{scriptUrl}}",
|
|
30
|
+
async: true
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
};
|
|
34
|
+
function hotjar({ siteId, version = 6, scriptUrl }) {
|
|
35
|
+
if (null == siteId) throw new Error('hotjar: missing or invalid siteId');
|
|
36
|
+
const normalizedSiteId = String(siteId).trim();
|
|
37
|
+
if (0 === normalizedSiteId.length || '0' === normalizedSiteId) throw new Error('hotjar: missing or invalid siteId');
|
|
38
|
+
return resolveManifest(hotjarManifest, {
|
|
39
|
+
siteId: normalizedSiteId,
|
|
40
|
+
version,
|
|
41
|
+
scriptUrl: resolveScriptUrl(scriptUrl, `https://static.hotjar.com/c/hotjar-${normalizedSiteId}.js?sv=${version}`)
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
export { hotjar, hotjarManifest };
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
logRocket: ()=>logRocket,
|
|
32
|
+
logRocketManifest: ()=>logRocketManifest
|
|
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_LOGROCKET_SCRIPT_URL = 'https://cdn.logrocket.io/LogRocket.min.js';
|
|
38
|
+
function validateLogRocketAppId(appId) {
|
|
39
|
+
const normalized = 'string' == typeof appId ? appId.trim() : '';
|
|
40
|
+
const segments = normalized.split('/');
|
|
41
|
+
if (2 !== segments.length || segments.some((segment)=>0 === segment.length)) throw new Error("logRocket: invalid appId - must be a non-empty string in 'org/app' format");
|
|
42
|
+
return normalized;
|
|
43
|
+
}
|
|
44
|
+
const logRocketManifest = {
|
|
45
|
+
...external_types_cjs_namespaceObject.vendorManifestContract,
|
|
46
|
+
vendor: 'logrocket',
|
|
47
|
+
category: 'measurement',
|
|
48
|
+
install: [
|
|
49
|
+
{
|
|
50
|
+
type: 'loadScript',
|
|
51
|
+
src: "{{scriptUrl}}",
|
|
52
|
+
attributes: {
|
|
53
|
+
crossorigin: 'anonymous'
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
afterLoad: [
|
|
58
|
+
{
|
|
59
|
+
type: 'callGlobal',
|
|
60
|
+
global: 'LogRocket',
|
|
61
|
+
method: 'init',
|
|
62
|
+
args: [
|
|
63
|
+
'{{appId}}',
|
|
64
|
+
'{{initOptions}}'
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
};
|
|
69
|
+
function logRocket(options) {
|
|
70
|
+
const appId = validateLogRocketAppId(options?.appId);
|
|
71
|
+
const asyncScriptUrl = (0, script_url_cjs_namespaceObject.trimToUndefined)(options.asyncScriptUrl);
|
|
72
|
+
let manifest = logRocketManifest;
|
|
73
|
+
if (asyncScriptUrl) manifest = {
|
|
74
|
+
...logRocketManifest,
|
|
75
|
+
bootstrap: [
|
|
76
|
+
{
|
|
77
|
+
type: 'setGlobal',
|
|
78
|
+
name: '_lrAsyncScript',
|
|
79
|
+
value: '{{asyncScriptUrl}}',
|
|
80
|
+
ifUndefined: false
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
};
|
|
84
|
+
return (0, external_resolve_cjs_namespaceObject.resolveManifest)(manifest, {
|
|
85
|
+
appId,
|
|
86
|
+
asyncScriptUrl,
|
|
87
|
+
initOptions: options.initOptions ?? {},
|
|
88
|
+
scriptUrl: (0, script_url_cjs_namespaceObject.resolveScriptUrl)((0, script_url_cjs_namespaceObject.trimToUndefined)(options.scriptUrl), DEFAULT_LOGROCKET_SCRIPT_URL)
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
exports.logRocket = __webpack_exports__.logRocket;
|
|
92
|
+
exports.logRocketManifest = __webpack_exports__.logRocketManifest;
|
|
93
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
94
|
+
"logRocket",
|
|
95
|
+
"logRocketManifest"
|
|
96
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
97
|
+
Object.defineProperty(exports, '__esModule', {
|
|
98
|
+
value: true
|
|
99
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { resolveManifest } from "../../resolve.js";
|
|
2
|
+
import { vendorManifestContract } from "../../types.js";
|
|
3
|
+
import { resolveScriptUrl, trimToUndefined } from "../_shared/script-url.js";
|
|
4
|
+
const DEFAULT_LOGROCKET_SCRIPT_URL = 'https://cdn.logrocket.io/LogRocket.min.js';
|
|
5
|
+
function validateLogRocketAppId(appId) {
|
|
6
|
+
const normalized = 'string' == typeof appId ? appId.trim() : '';
|
|
7
|
+
const segments = normalized.split('/');
|
|
8
|
+
if (2 !== segments.length || segments.some((segment)=>0 === segment.length)) throw new Error("logRocket: invalid appId - must be a non-empty string in 'org/app' format");
|
|
9
|
+
return normalized;
|
|
10
|
+
}
|
|
11
|
+
const logRocketManifest = {
|
|
12
|
+
...vendorManifestContract,
|
|
13
|
+
vendor: 'logrocket',
|
|
14
|
+
category: 'measurement',
|
|
15
|
+
install: [
|
|
16
|
+
{
|
|
17
|
+
type: 'loadScript',
|
|
18
|
+
src: "{{scriptUrl}}",
|
|
19
|
+
attributes: {
|
|
20
|
+
crossorigin: 'anonymous'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
afterLoad: [
|
|
25
|
+
{
|
|
26
|
+
type: 'callGlobal',
|
|
27
|
+
global: 'LogRocket',
|
|
28
|
+
method: 'init',
|
|
29
|
+
args: [
|
|
30
|
+
'{{appId}}',
|
|
31
|
+
'{{initOptions}}'
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
};
|
|
36
|
+
function logRocket(options) {
|
|
37
|
+
const appId = validateLogRocketAppId(options?.appId);
|
|
38
|
+
const asyncScriptUrl = trimToUndefined(options.asyncScriptUrl);
|
|
39
|
+
let manifest = logRocketManifest;
|
|
40
|
+
if (asyncScriptUrl) manifest = {
|
|
41
|
+
...logRocketManifest,
|
|
42
|
+
bootstrap: [
|
|
43
|
+
{
|
|
44
|
+
type: 'setGlobal',
|
|
45
|
+
name: '_lrAsyncScript',
|
|
46
|
+
value: '{{asyncScriptUrl}}',
|
|
47
|
+
ifUndefined: false
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
};
|
|
51
|
+
return resolveManifest(manifest, {
|
|
52
|
+
appId,
|
|
53
|
+
asyncScriptUrl,
|
|
54
|
+
initOptions: options.initOptions ?? {},
|
|
55
|
+
scriptUrl: resolveScriptUrl(trimToUndefined(options.scriptUrl), DEFAULT_LOGROCKET_SCRIPT_URL)
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
export { logRocket, logRocketManifest };
|