@c15t/scripts 3.0.0-alpha.2 → 3.0.0-alpha.4
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 +129 -63
- package/README.md +8 -29
- package/SKILL.md +33 -0
- package/dist/adobe-analytics.js +2 -0
- package/dist/ahrefs-analytics.js +2 -0
- package/dist/amplitude.js +2 -0
- package/dist/clearbit.js +2 -0
- package/dist/cloudflare-web-analytics.js +2 -0
- package/dist/cloudflare-zaraz.js +2 -0
- package/dist/crisp.js +2 -0
- package/dist/databuddy.js +2 -0
- package/dist/e2e-test-utils.js +2 -139
- package/dist/engine/compile.js +2 -89
- package/dist/engine/runtime.js +2 -448
- package/dist/events.js +2 -218
- package/dist/fathom-analytics.js +2 -0
- package/dist/front-chat.js +2 -0
- package/dist/google-tag-manager.js +2 -0
- package/dist/google-tag.js +2 -0
- package/dist/heap.js +2 -0
- package/dist/hightouch.js +2 -0
- package/dist/hotjar.js +2 -0
- package/dist/intercom.js +2 -0
- package/dist/klaviyo.js +2 -0
- package/dist/linkedin-insights.js +2 -0
- package/dist/logrocket.js +2 -0
- package/dist/matomo-analytics.js +2 -0
- package/dist/meta-pixel.js +2 -0
- package/dist/microsoft-clarity.js +2 -0
- package/dist/microsoft-uet.js +2 -0
- package/dist/mixpanel-analytics.js +2 -0
- package/dist/one-dollar-stats.js +2 -0
- package/dist/openai-pixel.js +2 -0
- package/dist/pinterest-tag.js +2 -0
- package/dist/pirsch.js +2 -0
- package/dist/plausible-analytics.js +2 -0
- package/dist/posthog.js +2 -0
- package/dist/promptwatch.js +2 -0
- package/dist/reddit-pixel.js +2 -0
- package/dist/registry.js +2 -422
- package/dist/resolve.js +2 -33
- package/dist/rudderstack.js +2 -0
- package/dist/rybbit-analytics.js +2 -0
- package/dist/segment.js +2 -0
- package/dist/snapchat-pixel.js +2 -0
- package/dist/tiktok-pixel.js +2 -0
- package/dist/types.js +2 -16
- package/dist/umami-analytics.js +2 -0
- package/dist/vendors/_shared/attributes.js +2 -14
- package/dist/vendors/_shared/google-consent.js +2 -27
- package/dist/vendors/_shared/install-builders.js +2 -21
- package/dist/vendors/_shared/required-id.js +2 -0
- package/dist/vendors/_shared/script-url.js +2 -28
- package/dist/vendors/ads-and-pixels/linkedin-insights.js +2 -48
- package/dist/vendors/ads-and-pixels/meta-pixel.js +2 -153
- package/dist/vendors/ads-and-pixels/microsoft-uet.js +2 -110
- package/dist/vendors/ads-and-pixels/openai-pixel.js +2 -88
- package/dist/vendors/ads-and-pixels/pinterest-tag.js +2 -123
- package/dist/vendors/ads-and-pixels/reddit-pixel.js +2 -107
- package/dist/vendors/ads-and-pixels/snapchat-pixel.js +2 -87
- package/dist/vendors/ads-and-pixels/tiktok-pixel.js +2 -89
- package/dist/vendors/ads-and-pixels/x-pixel.js +2 -48
- package/dist/vendors/analytics/adobe-analytics.js +2 -49
- package/dist/vendors/analytics/ahrefs-analytics.js +2 -27
- package/dist/vendors/analytics/amplitude.js +2 -134
- package/dist/vendors/analytics/clearbit.js +2 -28
- package/dist/vendors/analytics/cloudflare-web-analytics.js +2 -32
- package/dist/vendors/analytics/databuddy.js +2 -103
- package/dist/vendors/analytics/fathom-analytics.js +2 -35
- package/dist/vendors/analytics/google-tag.js +2 -78
- package/dist/vendors/analytics/heap.js +2 -134
- package/dist/vendors/analytics/hightouch.js +2 -109
- package/dist/vendors/analytics/hotjar.js +2 -44
- package/dist/vendors/analytics/logrocket.js +2 -58
- package/dist/vendors/analytics/matomo-analytics.js +2 -191
- package/dist/vendors/analytics/microsoft-clarity.js +2 -100
- package/dist/vendors/analytics/mixpanel-analytics.js +2 -93
- package/dist/vendors/analytics/one-dollar-stats.js +2 -30
- package/dist/vendors/analytics/pirsch.js +2 -67
- package/dist/vendors/analytics/plausible-analytics.js +2 -81
- package/dist/vendors/analytics/posthog.js +2 -200
- package/dist/vendors/analytics/promptwatch.js +2 -29
- package/dist/vendors/analytics/rudderstack.js +2 -183
- package/dist/vendors/analytics/rybbit-analytics.js +2 -63
- package/dist/vendors/analytics/segment.js +2 -65
- package/dist/vendors/analytics/umami-analytics.js +2 -39
- package/dist/vendors/analytics/vercel-analytics.js +2 -53
- package/dist/vendors/email-and-sms/klaviyo.js +2 -0
- package/dist/vendors/functional/crisp.js +2 -100
- package/dist/vendors/functional/front-chat.js +2 -64
- package/dist/vendors/functional/intercom.js +2 -45
- package/dist/vendors/tag-managers/cloudflare-zaraz.js +2 -98
- package/dist/vendors/tag-managers/google-tag-manager.js +2 -73
- package/dist/vercel-analytics.js +2 -0
- package/dist/x-pixel.js +2 -0
- package/dist-types/adobe-analytics.d.ts +2 -0
- package/dist-types/ahrefs-analytics.d.ts +2 -0
- package/dist-types/amplitude.d.ts +2 -0
- package/dist-types/clearbit.d.ts +2 -0
- package/dist-types/cloudflare-web-analytics.d.ts +2 -0
- package/dist-types/cloudflare-zaraz.d.ts +2 -0
- package/dist-types/crisp.d.ts +2 -0
- package/dist-types/databuddy.d.ts +2 -0
- package/dist-types/e2e-test-utils.d.ts +2 -0
- package/dist-types/engine/compile.d.ts +2 -3
- package/dist-types/engine/runtime.d.ts +2 -3
- package/dist-types/events.d.ts +2 -46
- package/dist-types/fathom-analytics.d.ts +2 -0
- package/dist-types/front-chat.d.ts +2 -0
- package/dist-types/google-tag-manager.d.ts +2 -0
- package/dist-types/google-tag.d.ts +2 -0
- package/dist-types/heap.d.ts +2 -0
- package/dist-types/hightouch.d.ts +2 -0
- package/dist-types/hotjar.d.ts +2 -0
- package/dist-types/intercom.d.ts +2 -0
- package/dist-types/klaviyo.d.ts +2 -0
- package/dist-types/linkedin-insights.d.ts +2 -0
- package/dist-types/logrocket.d.ts +2 -0
- package/dist-types/matomo-analytics.d.ts +2 -0
- package/dist-types/meta-pixel.d.ts +2 -0
- package/dist-types/microsoft-clarity.d.ts +2 -0
- package/dist-types/microsoft-uet.d.ts +2 -0
- package/dist-types/mixpanel-analytics.d.ts +2 -0
- package/dist-types/one-dollar-stats.d.ts +2 -0
- package/dist-types/openai-pixel.d.ts +2 -0
- package/dist-types/pinterest-tag.d.ts +2 -0
- package/dist-types/pirsch.d.ts +2 -0
- package/dist-types/plausible-analytics.d.ts +2 -0
- package/dist-types/posthog.d.ts +2 -0
- package/dist-types/promptwatch.d.ts +2 -0
- package/dist-types/reddit-pixel.d.ts +2 -0
- package/dist-types/registry.d.ts +2 -485
- package/dist-types/resolve.d.ts +2 -9
- package/dist-types/rudderstack.d.ts +2 -0
- package/dist-types/rybbit-analytics.d.ts +2 -0
- package/dist-types/segment.d.ts +2 -0
- package/dist-types/snapchat-pixel.d.ts +2 -0
- package/dist-types/tiktok-pixel.d.ts +2 -0
- package/dist-types/types.d.ts +2 -314
- package/dist-types/umami-analytics.d.ts +2 -0
- package/dist-types/vendors/_shared/attributes.d.ts +2 -35
- package/dist-types/vendors/_shared/google-consent.d.ts +2 -47
- package/dist-types/vendors/_shared/install-builders.d.ts +2 -30
- package/dist-types/vendors/_shared/required-id.d.ts +2 -0
- package/dist-types/vendors/_shared/script-url.d.ts +2 -75
- package/dist-types/vendors/ads-and-pixels/linkedin-insights.d.ts +2 -92
- package/dist-types/vendors/ads-and-pixels/meta-pixel.d.ts +2 -289
- package/dist-types/vendors/ads-and-pixels/microsoft-uet.d.ts +2 -105
- package/dist-types/vendors/ads-and-pixels/openai-pixel.d.ts +2 -211
- package/dist-types/vendors/ads-and-pixels/pinterest-tag.d.ts +2 -295
- package/dist-types/vendors/ads-and-pixels/reddit-pixel.d.ts +2 -210
- package/dist-types/vendors/ads-and-pixels/snapchat-pixel.d.ts +2 -171
- package/dist-types/vendors/ads-and-pixels/tiktok-pixel.d.ts +2 -106
- package/dist-types/vendors/ads-and-pixels/x-pixel.d.ts +2 -183
- package/dist-types/vendors/analytics/adobe-analytics.d.ts +2 -75
- package/dist-types/vendors/analytics/ahrefs-analytics.d.ts +2 -62
- package/dist-types/vendors/analytics/amplitude.d.ts +2 -234
- package/dist-types/vendors/analytics/clearbit.d.ts +2 -60
- package/dist-types/vendors/analytics/cloudflare-web-analytics.d.ts +2 -67
- package/dist-types/vendors/analytics/databuddy.d.ts +2 -147
- package/dist-types/vendors/analytics/fathom-analytics.d.ts +2 -90
- package/dist-types/vendors/analytics/google-tag.d.ts +2 -95
- package/dist-types/vendors/analytics/heap.d.ts +2 -316
- package/dist-types/vendors/analytics/hightouch.d.ts +2 -285
- package/dist-types/vendors/analytics/hotjar.d.ts +2 -73
- package/dist-types/vendors/analytics/logrocket.d.ts +2 -101
- package/dist-types/vendors/analytics/matomo-analytics.d.ts +2 -41
- package/dist-types/vendors/analytics/microsoft-clarity.d.ts +2 -97
- package/dist-types/vendors/analytics/mixpanel-analytics.d.ts +2 -113
- package/dist-types/vendors/analytics/one-dollar-stats.d.ts +2 -39
- package/dist-types/vendors/analytics/pirsch.d.ts +2 -96
- package/dist-types/vendors/analytics/plausible-analytics.d.ts +2 -122
- package/dist-types/vendors/analytics/posthog.d.ts +2 -175
- package/dist-types/vendors/analytics/promptwatch.d.ts +2 -36
- package/dist-types/vendors/analytics/rudderstack.d.ts +2 -330
- package/dist-types/vendors/analytics/rybbit-analytics.d.ts +2 -82
- package/dist-types/vendors/analytics/segment.d.ts +2 -164
- package/dist-types/vendors/analytics/umami-analytics.d.ts +2 -93
- package/dist-types/vendors/analytics/vercel-analytics.d.ts +2 -66
- package/dist-types/vendors/email-and-sms/klaviyo.d.ts +2 -0
- package/dist-types/vendors/functional/crisp.d.ts +2 -78
- package/dist-types/vendors/functional/front-chat.d.ts +2 -62
- package/dist-types/vendors/functional/intercom.d.ts +2 -135
- package/dist-types/vendors/tag-managers/cloudflare-zaraz.d.ts +2 -39
- package/dist-types/vendors/tag-managers/google-tag-manager.d.ts +2 -96
- package/dist-types/vercel-analytics.d.ts +2 -0
- package/dist-types/x-pixel.d.ts +2 -0
- package/docs/README.md +129 -63
- package/docs/assets/v3/bottom-bar.png +0 -0
- package/docs/assets/v3/brand-card.png +0 -0
- package/docs/assets/v3/brand-preferences.png +0 -0
- package/docs/assets/v3/choice-wall.png +0 -0
- package/docs/assets/v3/headless-bar-html.png +0 -0
- package/docs/assets/v3/headless-bar-mobile.png +0 -0
- package/docs/assets/v3/headless-bar.png +0 -0
- package/docs/assets/v3/slim-bar.png +0 -0
- package/docs/concepts/choose-your-setup.md +87 -0
- package/docs/concepts/consent-categories.md +84 -0
- package/docs/{guides → concepts}/consent-state.md +89 -105
- package/docs/{guides → concepts}/data-fetching.md +31 -27
- package/docs/concepts/how-consent-works.md +123 -0
- package/docs/concepts/policies.md +71 -0
- package/docs/customization/class-names.md +202 -0
- package/docs/customization/dark-mode.md +157 -0
- package/docs/customization/motion.md +119 -0
- package/docs/customization/overview.md +67 -34
- package/docs/customization/recipes.md +839 -49
- package/docs/customization/slots.md +216 -35
- package/docs/customization/stylesheets.md +147 -0
- package/docs/customization/tailwind.md +842 -0
- package/docs/customization/tokens.md +163 -96
- package/docs/customization/translations.md +60 -3
- package/docs/frameworks/astro/embeds.md +160 -0
- package/docs/frameworks/astro/network-blocker.md +86 -0
- package/docs/frameworks/astro/scripts.md +155 -0
- package/docs/frameworks/html/embeds.md +142 -0
- package/docs/frameworks/html/network-blocker.md +105 -0
- package/docs/frameworks/html/scripts.md +164 -0
- package/docs/frameworks/javascript/scripts.md +137 -0
- package/docs/frameworks/next/embeds.md +90 -0
- package/docs/frameworks/next/network-blocker.md +153 -0
- package/docs/frameworks/next/scripts.md +196 -0
- package/docs/frameworks/nuxt/embeds.md +81 -0
- package/docs/frameworks/nuxt/network-blocker.md +97 -0
- package/docs/frameworks/nuxt/scripts.md +89 -0
- package/docs/frameworks/react/embeds.md +89 -0
- package/docs/frameworks/react/network-blocker.md +140 -0
- package/docs/frameworks/react/scripts.md +115 -0
- package/docs/frameworks/svelte/embeds.md +96 -0
- package/docs/frameworks/svelte/network-blocker.md +141 -0
- package/docs/frameworks/svelte/scripts.md +144 -0
- package/docs/frameworks/sveltekit/embeds.md +103 -0
- package/docs/frameworks/sveltekit/network-blocker.md +159 -0
- package/docs/frameworks/sveltekit/scripts.md +172 -0
- package/docs/frameworks/tanstack-start/embeds.md +96 -0
- package/docs/frameworks/tanstack-start/network-blocker.md +145 -0
- package/docs/frameworks/tanstack-start/scripts.md +103 -0
- package/docs/frameworks/vue/embeds.md +84 -0
- package/docs/frameworks/vue/network-blocker.md +99 -0
- package/docs/frameworks/vue/scripts.md +93 -0
- package/docs/guides/banner-experiments.md +654 -0
- package/docs/guides/troubleshooting.md +120 -47
- package/docs/guides/verify-consent.md +81 -49
- package/docs/integrations/adobe-analytics.md +167 -159
- package/docs/integrations/ahrefs-analytics.md +152 -154
- package/docs/integrations/amplitude.md +162 -156
- package/docs/integrations/building-integrations.md +136 -37
- package/docs/integrations/clearbit.md +154 -154
- package/docs/integrations/cloudflare-web-analytics.md +156 -156
- package/docs/integrations/cloudflare-zaraz.md +209 -261
- package/docs/integrations/crisp.md +164 -158
- package/docs/integrations/databuddy.md +157 -173
- package/docs/integrations/fathom-analytics.md +158 -156
- package/docs/integrations/front-chat.md +167 -167
- package/docs/integrations/google-maps.md +118 -83
- package/docs/integrations/google-tag-manager.md +178 -163
- package/docs/integrations/google-tag.md +163 -160
- package/docs/integrations/heap.md +163 -155
- package/docs/integrations/hightouch.md +161 -157
- package/docs/integrations/hotjar.md +159 -155
- package/docs/integrations/intercom.md +183 -153
- package/docs/integrations/klaviyo.md +486 -0
- package/docs/integrations/linkedin-insights.md +174 -150
- package/docs/integrations/logrocket.md +160 -156
- package/docs/integrations/matomo-analytics.md +188 -178
- package/docs/integrations/meta-pixel.md +188 -150
- package/docs/integrations/microsoft-clarity.md +163 -155
- package/docs/integrations/microsoft-uet.md +148 -154
- package/docs/integrations/mixpanel-analytics.md +155 -160
- package/docs/integrations/one-dollar-stats.md +166 -165
- package/docs/integrations/openai-pixel.md +204 -301
- package/docs/integrations/overview.md +137 -80
- package/docs/integrations/pinterest-tag.md +191 -183
- package/docs/integrations/pirsch.md +169 -159
- package/docs/integrations/plausible-analytics.md +172 -158
- package/docs/integrations/posthog.md +313 -240
- package/docs/integrations/promptwatch.md +154 -154
- package/docs/integrations/reddit-pixel.md +185 -157
- package/docs/integrations/rudderstack.md +201 -186
- package/docs/integrations/rybbit-analytics.md +171 -160
- package/docs/integrations/segment.md +182 -154
- package/docs/integrations/snapchat-pixel.md +186 -156
- package/docs/integrations/tiktok-pixel.md +171 -150
- package/docs/integrations/umami-analytics.md +163 -158
- package/docs/integrations/vercel-analytics.md +166 -157
- package/docs/integrations/x-pixel.md +176 -150
- package/docs/integrations/youtube.md +121 -86
- package/docs/upgrade-v3.md +496 -467
- package/package.json +10 -257
- package/dist-types/__tests__/helpers.d.ts +0 -141
- package/docs/assets/v3/brand-bar.png +0 -0
- package/docs/assets/v3/mobile-card.png +0 -0
- package/docs/assets/v3/preferences.png +0 -0
- package/docs/frameworks/javascript/script-loader.md +0 -100
- package/docs/frameworks/next/script-loader.md +0 -216
- package/docs/frameworks/react/script-loader.md +0 -69
- package/docs/guides/deployment-modes.md +0 -75
- package/docs/guides/shared-consent-controls.md +0 -158
- package/docs/integrations/clear-on-revocation.md +0 -167
- package/docs/integrations/granular-consent.md +0 -210
package/dist-types/types.d.ts
CHANGED
|
@@ -1,314 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export declare const VENDOR_MANIFEST_SCHEMA_VERSION = 1;
|
|
4
|
-
export declare const vendorManifestContract: {
|
|
5
|
-
readonly kind: "c15t.vendor-manifest";
|
|
6
|
-
readonly schemaVersion: 1;
|
|
7
|
-
};
|
|
8
|
-
export declare const RUNTIME_VALUE_KIND = "c15t.runtime-value";
|
|
9
|
-
export interface RuntimeValue {
|
|
10
|
-
kind: typeof RUNTIME_VALUE_KIND;
|
|
11
|
-
value: 'date' | 'timestamp';
|
|
12
|
-
}
|
|
13
|
-
export declare const runtimeDateValue: {
|
|
14
|
-
readonly kind: "c15t.runtime-value";
|
|
15
|
-
readonly value: 'date';
|
|
16
|
-
};
|
|
17
|
-
export declare const runtimeTimestampValue: {
|
|
18
|
-
readonly kind: "c15t.runtime-value";
|
|
19
|
-
readonly value: 'timestamp';
|
|
20
|
-
};
|
|
21
|
-
export interface ManifestContract {
|
|
22
|
-
kind: typeof VENDOR_MANIFEST_KIND;
|
|
23
|
-
schemaVersion: typeof VENDOR_MANIFEST_SCHEMA_VERSION;
|
|
24
|
-
}
|
|
25
|
-
type ManifestInterpolationToken = `{{${string}}}`;
|
|
26
|
-
export type ManifestCategoryCondition = HasCondition<AllConsentNames | ManifestInterpolationToken>;
|
|
27
|
-
export interface LoadScriptStep {
|
|
28
|
-
type: 'loadScript';
|
|
29
|
-
src: string;
|
|
30
|
-
async?: boolean;
|
|
31
|
-
defer?: boolean;
|
|
32
|
-
attributes?: Record<string, string>;
|
|
33
|
-
}
|
|
34
|
-
export interface SetGlobalStep {
|
|
35
|
-
type: 'setGlobal';
|
|
36
|
-
/** Global variable name (e.g. 'dataLayer') */
|
|
37
|
-
name: string;
|
|
38
|
-
/** Value to assign. Arrays and objects are recursively cloned on execution. */
|
|
39
|
-
value: unknown;
|
|
40
|
-
/**
|
|
41
|
-
* Only set the global if it's not already defined.
|
|
42
|
-
* Mirrors the common `window.x = window.x || value` pattern.
|
|
43
|
-
* @default true
|
|
44
|
-
*/
|
|
45
|
-
ifUndefined?: boolean;
|
|
46
|
-
}
|
|
47
|
-
export interface DefineQueueFunctionStep {
|
|
48
|
-
type: 'defineQueueFunction';
|
|
49
|
-
/** Global function name (e.g. 'gtag') */
|
|
50
|
-
name: string;
|
|
51
|
-
/** Global array name that receives queued calls (e.g. 'dataLayer') */
|
|
52
|
-
queue: string;
|
|
53
|
-
/**
|
|
54
|
-
* Only define the function if it is not already present.
|
|
55
|
-
* @default true
|
|
56
|
-
*/
|
|
57
|
-
ifUndefined?: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Whether queued calls should store the `arguments` object or a copied array.
|
|
60
|
-
* @default 'arguments'
|
|
61
|
-
*/
|
|
62
|
-
pushStyle?: 'arguments' | 'array';
|
|
63
|
-
}
|
|
64
|
-
export interface DefineStubFunctionStep {
|
|
65
|
-
type: 'defineStubFunction';
|
|
66
|
-
/** Global function name (e.g. 'fbq', 'twq', 'lintrk') */
|
|
67
|
-
name: string;
|
|
68
|
-
/**
|
|
69
|
-
* Queue storage location:
|
|
70
|
-
* - `global` pushes into another global array (e.g. `dataLayer`)
|
|
71
|
-
* - `property` pushes into a property on the stub function itself (e.g. `fbq.queue`)
|
|
72
|
-
*/
|
|
73
|
-
queue: {
|
|
74
|
-
global: string;
|
|
75
|
-
property?: never;
|
|
76
|
-
} | {
|
|
77
|
-
global?: never;
|
|
78
|
-
property: string;
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* If present, calls `stub[dispatchProperty](...args)` when available instead of queueing.
|
|
82
|
-
* Mirrors vendor APIs like Meta Pixel's `callMethod`.
|
|
83
|
-
*/
|
|
84
|
-
dispatchProperty?: string;
|
|
85
|
-
/**
|
|
86
|
-
* How queued values should be stored.
|
|
87
|
-
* - `'arguments'` => push the `arguments` object
|
|
88
|
-
* - `'array'` => push a copied array of arguments
|
|
89
|
-
*/
|
|
90
|
-
queueFormat?: 'arguments' | 'array';
|
|
91
|
-
/** Additional globals that should reference the same stub */
|
|
92
|
-
aliases?: string[];
|
|
93
|
-
/** Properties on the stub that should reference the stub itself (e.g. `push`) */
|
|
94
|
-
selfReferences?: string[];
|
|
95
|
-
/** Additional scalar/object properties assigned to the stub */
|
|
96
|
-
properties?: Record<string, unknown>;
|
|
97
|
-
/** Only define the stub if not already present. */
|
|
98
|
-
ifUndefined?: boolean;
|
|
99
|
-
}
|
|
100
|
-
export interface CallGlobalStep {
|
|
101
|
-
type: 'callGlobal';
|
|
102
|
-
/** Global object name (e.g. 'posthog', 'fbq') */
|
|
103
|
-
global: string;
|
|
104
|
-
/** Method to call on the global. If omitted, the global itself is called as a function. */
|
|
105
|
-
method?: string;
|
|
106
|
-
/** Arguments to pass */
|
|
107
|
-
args?: unknown[];
|
|
108
|
-
}
|
|
109
|
-
export interface PushToQueueStep {
|
|
110
|
-
type: 'pushToQueue';
|
|
111
|
-
/** Global array name that receives queued values (e.g. 'dataLayer') */
|
|
112
|
-
queue: string;
|
|
113
|
-
/** Value to push onto the queue */
|
|
114
|
-
value: unknown;
|
|
115
|
-
}
|
|
116
|
-
export interface SetGlobalPathStep {
|
|
117
|
-
type: 'setGlobalPath';
|
|
118
|
-
/** Path segments under window (e.g. ['databuddy', 'options', 'disabled']) */
|
|
119
|
-
path: string[];
|
|
120
|
-
/** Value to assign at the target path */
|
|
121
|
-
value: unknown;
|
|
122
|
-
/** Only assign while the root global is still a snippet queue array. */
|
|
123
|
-
ifGlobalIsQueue?: boolean;
|
|
124
|
-
}
|
|
125
|
-
export interface DefineQueueMethodsStep {
|
|
126
|
-
type: 'defineQueueMethods';
|
|
127
|
-
/** Global array/object name that owns the queue methods */
|
|
128
|
-
target: string;
|
|
129
|
-
/** Method names to attach */
|
|
130
|
-
methods: string[];
|
|
131
|
-
/** Optional queue location. Defaults to the target itself. */
|
|
132
|
-
queue?: {
|
|
133
|
-
global: string;
|
|
134
|
-
property?: never;
|
|
135
|
-
} | {
|
|
136
|
-
global?: never;
|
|
137
|
-
property: string;
|
|
138
|
-
};
|
|
139
|
-
/**
|
|
140
|
-
* Format used for each queued method call.
|
|
141
|
-
*
|
|
142
|
-
* - `tuple` pushes `[methodName, ...args]`, matching classic array queues.
|
|
143
|
-
* - `methodCall` pushes `{ name, args, resolve }` and returns a `Promise`,
|
|
144
|
-
* matching SDK loaders that replay named calls and resolve the original
|
|
145
|
-
* pre-load promise after the real method runs.
|
|
146
|
-
* - `wrappedMethodCall` queues like `methodCall` but returns
|
|
147
|
-
* `{ promise }`, matching Amplitude's snippet contract where queued
|
|
148
|
-
* proxy calls expose the pending promise on a `promise` property.
|
|
149
|
-
* - `voidMethodCall` queues like `methodCall` but returns nothing,
|
|
150
|
-
* matching snippet methods the vendor treats as synchronous.
|
|
151
|
-
* - `callback` pushes `{ name, fn }`, where `fn` replays the captured call
|
|
152
|
-
* against the current global target, matching loaders that own a
|
|
153
|
-
* ready-callback queue.
|
|
154
|
-
*
|
|
155
|
-
* @default 'tuple'
|
|
156
|
-
*/
|
|
157
|
-
queueFormat?: 'tuple' | 'methodCall' | 'wrappedMethodCall' | 'voidMethodCall' | 'callback';
|
|
158
|
-
}
|
|
159
|
-
export interface DefineQueueClassStep {
|
|
160
|
-
type: 'defineQueueClass';
|
|
161
|
-
/** Global object that receives the queued helper class. */
|
|
162
|
-
target: string;
|
|
163
|
-
/** Constructor property name to define on the target object. */
|
|
164
|
-
name: string;
|
|
165
|
-
/**
|
|
166
|
-
* Instance property that stores queued helper method calls.
|
|
167
|
-
*
|
|
168
|
-
* @default '_q'
|
|
169
|
-
*/
|
|
170
|
-
queueProperty?: string;
|
|
171
|
-
/** Helper instance method names to attach to the constructor prototype. */
|
|
172
|
-
methods: string[];
|
|
173
|
-
}
|
|
174
|
-
export type GlobalMethodBehavior = {
|
|
175
|
-
name: string;
|
|
176
|
-
behavior: 'noop';
|
|
177
|
-
} | {
|
|
178
|
-
name: string;
|
|
179
|
-
behavior: 'return';
|
|
180
|
-
value: unknown;
|
|
181
|
-
};
|
|
182
|
-
export interface DefineGlobalMethodsStep {
|
|
183
|
-
type: 'defineGlobalMethods';
|
|
184
|
-
/** Global object name to receive the methods */
|
|
185
|
-
target: string;
|
|
186
|
-
methods: GlobalMethodBehavior[];
|
|
187
|
-
/** Only define methods while the target is still a snippet queue array. */
|
|
188
|
-
ifGlobalIsQueue?: boolean;
|
|
189
|
-
}
|
|
190
|
-
export interface ConstructGlobalStep {
|
|
191
|
-
type: 'constructGlobal';
|
|
192
|
-
/** Global constructor name (e.g. `UET`) */
|
|
193
|
-
constructor: string;
|
|
194
|
-
/** Global name to assign the constructed instance to */
|
|
195
|
-
assignTo: string;
|
|
196
|
-
/** Constructor args */
|
|
197
|
-
args?: unknown[];
|
|
198
|
-
/**
|
|
199
|
-
* Copies the current `window[assignTo]` value into the first constructor arg object
|
|
200
|
-
* under this property before constructing.
|
|
201
|
-
*/
|
|
202
|
-
copyAssignedValueToArgProperty?: string;
|
|
203
|
-
}
|
|
204
|
-
export type ManifestStep = LoadScriptStep | SetGlobalStep | DefineQueueFunctionStep | DefineStubFunctionStep | CallGlobalStep | PushToQueueStep | SetGlobalPathStep | DefineQueueMethodsStep | DefineQueueClassStep | DefineGlobalMethodsStep | ConstructGlobalStep;
|
|
205
|
-
/**
|
|
206
|
-
* Consent signal type determines how consent state is communicated to the vendor.
|
|
207
|
-
*
|
|
208
|
-
* - `'gtag'` — Google Consent Mode pattern: calls `gtag('consent', 'default'|'update', state)`
|
|
209
|
-
* - `'rudderstack'` — RudderStack consent-management pattern: calls
|
|
210
|
-
* `rudderanalytics.consent({ consentManagement: { enabled, provider: 'custom',
|
|
211
|
-
* allowedConsentIds, deniedConsentIds } })` with the mapping's consent IDs
|
|
212
|
-
* partitioned by the current c15t consent state
|
|
213
|
-
*/
|
|
214
|
-
export type ConsentSignalType = 'gtag' | 'rudderstack';
|
|
215
|
-
/**
|
|
216
|
-
* A declarative definition of a vendor integration.
|
|
217
|
-
*
|
|
218
|
-
* Manifests are the source definition that the scripts engine compiles into a
|
|
219
|
-
* serializable resolved manifest and then converts into a runtime `Script`.
|
|
220
|
-
*/
|
|
221
|
-
export interface VendorManifest extends ManifestContract {
|
|
222
|
-
/** Manifest contract identifier. */
|
|
223
|
-
kind: typeof VENDOR_MANIFEST_KIND;
|
|
224
|
-
/** Manifest schema version. */
|
|
225
|
-
schemaVersion: typeof VENDOR_MANIFEST_SCHEMA_VERSION;
|
|
226
|
-
/** Unique vendor identifier (used as Script.id) */
|
|
227
|
-
vendor: string;
|
|
228
|
-
/** Consent category or condition required to load this vendor */
|
|
229
|
-
category: ManifestCategoryCondition;
|
|
230
|
-
/** Load regardless of consent state (vendor manages its own consent internally) */
|
|
231
|
-
alwaysLoad?: boolean | string;
|
|
232
|
-
/** Keep script in DOM after consent revocation (vendor has a consent API) */
|
|
233
|
-
persistAfterConsentRevoked?: boolean | string;
|
|
234
|
-
/**
|
|
235
|
-
* Steps that must execute before default consent signaling.
|
|
236
|
-
*
|
|
237
|
-
* This is primarily used for integrations such as Google tags where a stub
|
|
238
|
-
* global must exist before calling the vendor's consent API.
|
|
239
|
-
*/
|
|
240
|
-
bootstrap?: ManifestStep[];
|
|
241
|
-
/**
|
|
242
|
-
* Steps to execute when installing the vendor.
|
|
243
|
-
*
|
|
244
|
-
* The resolver extracts the script source from these steps:
|
|
245
|
-
* - If a `loadScript` step exists, its `src` becomes `Script.src`
|
|
246
|
-
* - All non-`loadScript` steps run as part of `onBeforeLoad`
|
|
247
|
-
*/
|
|
248
|
-
install: ManifestStep[];
|
|
249
|
-
/** Steps to execute after the main script loads */
|
|
250
|
-
afterLoad?: ManifestStep[];
|
|
251
|
-
/** Steps to execute before load when the vendor has consent */
|
|
252
|
-
onBeforeLoadGranted?: ManifestStep[];
|
|
253
|
-
/** Steps to execute before load when the vendor does not have consent */
|
|
254
|
-
onBeforeLoadDenied?: ManifestStep[];
|
|
255
|
-
/** Steps to execute after load when the vendor has consent */
|
|
256
|
-
onLoadGranted?: ManifestStep[];
|
|
257
|
-
/** Steps to execute after load when the vendor does not have consent */
|
|
258
|
-
onLoadDenied?: ManifestStep[];
|
|
259
|
-
/** Steps to run on any consent state change */
|
|
260
|
-
onConsentChange?: ManifestStep[];
|
|
261
|
-
/** Steps to run when this vendor's category consent is granted */
|
|
262
|
-
onConsentGranted?: ManifestStep[];
|
|
263
|
-
/** Steps to run when this vendor's category consent is denied */
|
|
264
|
-
onConsentDenied?: ManifestStep[];
|
|
265
|
-
/**
|
|
266
|
-
* Maps c15t consent categories to vendor-specific consent type names.
|
|
267
|
-
*
|
|
268
|
-
* Used with `consentSignal` to translate c15t consent state into
|
|
269
|
-
* the vendor's consent API format.
|
|
270
|
-
*
|
|
271
|
-
* @example
|
|
272
|
-
* ```ts
|
|
273
|
-
* // Google Consent Mode v2 mapping
|
|
274
|
-
* consentMapping: {
|
|
275
|
-
* marketing: ['ad_storage', 'ad_user_data', 'ad_personalization'],
|
|
276
|
-
* measurement: ['analytics_storage'],
|
|
277
|
-
* functionality: ['functionality_storage'],
|
|
278
|
-
* necessary: ['security_storage'],
|
|
279
|
-
* experience: ['personalization_storage'],
|
|
280
|
-
* }
|
|
281
|
-
* ```
|
|
282
|
-
*/
|
|
283
|
-
consentMapping?: Record<string, string[]>;
|
|
284
|
-
/** How to signal consent state to the vendor */
|
|
285
|
-
consentSignal?: ConsentSignalType;
|
|
286
|
-
/** Target global for consent signaling (defaults based on signal type) */
|
|
287
|
-
consentSignalTarget?: string;
|
|
288
|
-
}
|
|
289
|
-
/**
|
|
290
|
-
* Internal transport-ready manifest shape produced by the compile phase.
|
|
291
|
-
*
|
|
292
|
-
* Contains only serializable data and no runtime callbacks.
|
|
293
|
-
*/
|
|
294
|
-
export interface ResolvedManifest extends ManifestContract {
|
|
295
|
-
vendor: string;
|
|
296
|
-
category: HasCondition<AllConsentNames>;
|
|
297
|
-
alwaysLoad?: boolean;
|
|
298
|
-
persistAfterConsentRevoked?: boolean;
|
|
299
|
-
bootstrapSteps: ManifestStep[];
|
|
300
|
-
setupSteps: ManifestStep[];
|
|
301
|
-
loadScript?: LoadScriptStep;
|
|
302
|
-
afterLoadSteps: ManifestStep[];
|
|
303
|
-
onBeforeLoadGrantedSteps: ManifestStep[];
|
|
304
|
-
onBeforeLoadDeniedSteps: ManifestStep[];
|
|
305
|
-
onLoadGrantedSteps: ManifestStep[];
|
|
306
|
-
onLoadDeniedSteps: ManifestStep[];
|
|
307
|
-
onConsentChangeSteps: ManifestStep[];
|
|
308
|
-
onConsentGrantedSteps: ManifestStep[];
|
|
309
|
-
onConsentDeniedSteps: ManifestStep[];
|
|
310
|
-
consentMapping?: Record<string, string[]>;
|
|
311
|
-
consentSignal?: ConsentSignalType;
|
|
312
|
-
consentSignalTarget?: string;
|
|
313
|
-
}
|
|
314
|
-
export {};
|
|
1
|
+
/** @deprecated Use @c15t/integrations/types. Compatibility ends in v4. */
|
|
2
|
+
export * from '@c15t/integrations/types';
|
|
@@ -1,35 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* attribute.
|
|
4
|
-
*
|
|
5
|
-
* @param value - Optional boolean value from a vendor option.
|
|
6
|
-
* @returns `'true'` or `'false'` when a boolean is provided, otherwise
|
|
7
|
-
* `undefined` so the manifest compiler can omit the attribute.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* booleanDataAttribute(true); // 'true'
|
|
12
|
-
* booleanDataAttribute(false); // 'false'
|
|
13
|
-
* booleanDataAttribute(undefined); // undefined
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
export declare const booleanDataAttribute: (value: boolean | undefined) => string | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* Converts a string or string list into a script `data-*` attribute value.
|
|
19
|
-
*
|
|
20
|
-
* Arrays are JSON-serialized so values containing commas can be round-tripped
|
|
21
|
-
* with `JSON.parse` by consumers that read the attribute.
|
|
22
|
-
*
|
|
23
|
-
* @param value - Optional string value or string list from a vendor option.
|
|
24
|
-
* @returns The original string, a JSON-serialized array, or `undefined` so the
|
|
25
|
-
* manifest compiler can omit the attribute.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```ts
|
|
29
|
-
* listDataAttribute('example.com'); // 'example.com'
|
|
30
|
-
* listDataAttribute(['a.com', 'b.com']); // '["a.com","b.com"]'
|
|
31
|
-
* listDataAttribute([]); // undefined
|
|
32
|
-
* listDataAttribute(undefined); // undefined
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
export declare const listDataAttribute: (value: string[] | string | undefined) => string | undefined;
|
|
1
|
+
/** @deprecated Use @c15t/integrations/vendors/_shared/attributes. Compatibility ends in v4. */
|
|
2
|
+
export * from '@c15t/integrations/vendors/_shared/attributes';
|
|
@@ -1,47 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @remarks
|
|
5
|
-
* Shared by direct gtag.js and Google Tag Manager integrations so both emit the
|
|
6
|
-
* same Google storage consent defaults unless a caller provides an override.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```ts
|
|
10
|
-
* const manifest = {
|
|
11
|
-
* consentMapping: GOOGLE_CONSENT_MODE_V2_DEFAULT_MAPPING,
|
|
12
|
-
* };
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
export declare const GOOGLE_CONSENT_MODE_V2_DEFAULT_MAPPING: Record<string, string[]>;
|
|
16
|
-
/**
|
|
17
|
-
* Applies an optional Google consent mapping override to a manifest.
|
|
18
|
-
*
|
|
19
|
-
* @param manifest - Vendor manifest that already contains the default consent
|
|
20
|
-
* mapping.
|
|
21
|
-
* @param consentMapping - Optional caller-provided mapping from c15t consent
|
|
22
|
-
* categories to Google consent types.
|
|
23
|
-
* @returns The original manifest when no override is provided, or a shallow
|
|
24
|
-
* copy with the override mapping when one is provided.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* const customMapping: Record<string, string[]> = {
|
|
29
|
-
* marketing: ['ad_storage'],
|
|
30
|
-
* };
|
|
31
|
-
* const mapped = withOptionalConsentMapping<TManifest>(
|
|
32
|
-
* manifest,
|
|
33
|
-
* customMapping
|
|
34
|
-
* );
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```ts
|
|
39
|
-
* const unchanged = withOptionalConsentMapping<TManifest>(
|
|
40
|
-
* manifest,
|
|
41
|
-
* undefined
|
|
42
|
-
* );
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
export declare const withOptionalConsentMapping: <TManifest extends {
|
|
46
|
-
consentMapping?: Record<string, string[]>;
|
|
47
|
-
}>(manifest: TManifest, consentMapping: Record<string, string[]> | undefined) => TManifest;
|
|
1
|
+
/** @deprecated Use @c15t/integrations/vendors/_shared/google-consent. Compatibility ends in v4. */
|
|
2
|
+
export * from '@c15t/integrations/vendors/_shared/google-consent';
|
|
@@ -1,30 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Optional tracking call inserted between the vendor init call and script load.
|
|
4
|
-
*/
|
|
5
|
-
interface QueuePixelInstallStep {
|
|
6
|
-
/** Arguments passed to the vendor queue function. */
|
|
7
|
-
args: unknown[];
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Options for building the common pixel install sequence.
|
|
11
|
-
*/
|
|
12
|
-
export interface BuildQueuePixelInstallOptions {
|
|
13
|
-
/** Global queue function to call, for example `rdt` or `snaptr`. */
|
|
14
|
-
global: string;
|
|
15
|
-
/** Arguments for the required initialization call. */
|
|
16
|
-
initArgs: unknown[];
|
|
17
|
-
/** Optional tracking command queued immediately after initialization. */
|
|
18
|
-
trackStep?: QueuePixelInstallStep;
|
|
19
|
-
/** Manifest interpolation token used for the final loader script URL. */
|
|
20
|
-
scriptPlaceholder?: string;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Builds the common queue-pixel install sequence used by advertising pixels.
|
|
24
|
-
*
|
|
25
|
-
* @param options - Queue pixel install options.
|
|
26
|
-
* @returns Manifest install steps containing the required init call, an
|
|
27
|
-
* optional tracking call, and an async `loadScript` step.
|
|
28
|
-
*/
|
|
29
|
-
export declare const buildQueuePixelInstall: ({ global, initArgs, trackStep, scriptPlaceholder, }: BuildQueuePixelInstallOptions) => VendorManifest['install'];
|
|
30
|
-
export {};
|
|
1
|
+
/** @deprecated Use @c15t/integrations/vendors/_shared/install-builders. Compatibility ends in v4. */
|
|
2
|
+
export * from '@c15t/integrations/vendors/_shared/install-builders';
|
|
@@ -1,75 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* missing.
|
|
4
|
-
*
|
|
5
|
-
* @param value - Optional string value, usually a user-provided override.
|
|
6
|
-
* @returns The trimmed string when it contains non-whitespace characters,
|
|
7
|
-
* otherwise `undefined`.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* trimToUndefined(', https://cdn.example.com '); // 'https://cdn.example.com'
|
|
12
|
-
* trimToUndefined(' '); // undefined
|
|
13
|
-
* trimToUndefined(undefined); // undefined
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
export declare const trimToUndefined: (value: string | undefined) => string | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* Resolves a script URL from an optional override and a required fallback.
|
|
19
|
-
*
|
|
20
|
-
* @param override - Explicit script URL supplied by the integration caller.
|
|
21
|
-
* @param fallback - Default vendor script URL.
|
|
22
|
-
* @returns `override` when it is defined, otherwise `fallback`.
|
|
23
|
-
*
|
|
24
|
-
* @remarks
|
|
25
|
-
* This helper intentionally does not trim or validate the override. Use
|
|
26
|
-
* `trimToUndefined` before calling this helper when blank string overrides
|
|
27
|
-
* should fall back to the vendor default.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```ts
|
|
31
|
-
* resolveScriptUrl(undefined, 'https://cdn.example.com/default.js');
|
|
32
|
-
* // 'https://cdn.example.com/default.js'
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```ts
|
|
37
|
-
* resolveScriptUrl(
|
|
38
|
-
* 'https://custom.com/script.js',
|
|
39
|
-
* 'https://cdn.example.com/default.js'
|
|
40
|
-
* );
|
|
41
|
-
* // 'https://custom.com/script.js'
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
export declare const resolveScriptUrl: (override: string | undefined, fallback: string) => string;
|
|
45
|
-
/**
|
|
46
|
-
* Removes leading slash characters without using a regular expression.
|
|
47
|
-
*
|
|
48
|
-
* This helper is used on caller-controlled URL fragments, so it intentionally
|
|
49
|
-
* stays linear even for very long repeated slash input.
|
|
50
|
-
*/
|
|
51
|
-
export declare const stripLeadingSlashes: (value: string) => string;
|
|
52
|
-
/**
|
|
53
|
-
* Removes trailing slash characters without using a regular expression.
|
|
54
|
-
*
|
|
55
|
-
* This helper is used on caller-controlled URL fragments, so it intentionally
|
|
56
|
-
* stays linear even for very long repeated slash input.
|
|
57
|
-
*/
|
|
58
|
-
export declare const stripTrailingSlashes: (value: string) => string;
|
|
59
|
-
/**
|
|
60
|
-
* Joins a base URL and path with exactly one slash between them.
|
|
61
|
-
*
|
|
62
|
-
* @param base - Base URL or origin. Trailing slashes are removed before joining.
|
|
63
|
-
* @param path - Path segment. Leading slashes are removed before joining.
|
|
64
|
-
* @returns A slash-joined URL string.
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
* ```ts
|
|
68
|
-
* joinUrlPath('https://example.com///', '///script.js');
|
|
69
|
-
* // 'https://example.com/script.js'
|
|
70
|
-
*
|
|
71
|
-
* joinUrlPath('https://example.com', 'script.js');
|
|
72
|
-
* // 'https://example.com/script.js'
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
export declare const joinUrlPath: (base: string, path: string) => string;
|
|
1
|
+
/** @deprecated Use @c15t/integrations/vendors/_shared/script-url. Compatibility ends in v4. */
|
|
2
|
+
export * from '@c15t/integrations/vendors/_shared/script-url';
|
|
@@ -1,92 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
conversion_id: string | number;
|
|
4
|
-
[key: string]: unknown;
|
|
5
|
-
}
|
|
6
|
-
interface LinkedInInsightsFunction {
|
|
7
|
-
(command: 'track', event: LinkedInInsightsConversionEvent): void;
|
|
8
|
-
(command: string, ...args: unknown[]): void;
|
|
9
|
-
}
|
|
10
|
-
declare global {
|
|
11
|
-
interface Window {
|
|
12
|
-
lintrk: LinkedInInsightsFunction & {
|
|
13
|
-
q?: unknown[][];
|
|
14
|
-
};
|
|
15
|
-
_linkedin_partner_id?: string;
|
|
16
|
-
_linkedin_data_partner_ids?: string[];
|
|
17
|
-
ORIBILI?: {
|
|
18
|
-
_DEBUG?: {
|
|
19
|
-
disableScript?: () => void;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* LinkedIn Insight Tag vendor manifest.
|
|
26
|
-
*
|
|
27
|
-
* Sets up the LinkedIn partner ID globals and loads the Insight Tag script
|
|
28
|
-
* via structured startup steps.
|
|
29
|
-
*/
|
|
30
|
-
export declare const linkedinInsightsManifest: {
|
|
31
|
-
readonly kind: "c15t.vendor-manifest";
|
|
32
|
-
readonly schemaVersion: 1;
|
|
33
|
-
readonly category: 'marketing';
|
|
34
|
-
readonly install: [{
|
|
35
|
-
readonly ifUndefined: false;
|
|
36
|
-
readonly name: '_linkedin_partner_id';
|
|
37
|
-
readonly type: 'setGlobal';
|
|
38
|
-
readonly value: '{{id}}';
|
|
39
|
-
}, {
|
|
40
|
-
readonly ifUndefined: true;
|
|
41
|
-
readonly name: '_linkedin_data_partner_ids';
|
|
42
|
-
readonly type: 'setGlobal';
|
|
43
|
-
readonly value: readonly [];
|
|
44
|
-
}, {
|
|
45
|
-
readonly queue: '_linkedin_data_partner_ids';
|
|
46
|
-
readonly type: 'pushToQueue';
|
|
47
|
-
readonly value: '{{id}}';
|
|
48
|
-
}, {
|
|
49
|
-
readonly ifUndefined: true;
|
|
50
|
-
readonly name: 'lintrk';
|
|
51
|
-
readonly queue: {
|
|
52
|
-
readonly property: 'q';
|
|
53
|
-
};
|
|
54
|
-
readonly queueFormat: 'array';
|
|
55
|
-
readonly type: 'defineStubFunction';
|
|
56
|
-
}, {
|
|
57
|
-
readonly async: true;
|
|
58
|
-
readonly src: '{{scriptSrc}}';
|
|
59
|
-
readonly type: 'loadScript';
|
|
60
|
-
}];
|
|
61
|
-
readonly vendor: 'linkedin-insights';
|
|
62
|
-
};
|
|
63
|
-
export interface LinkedInInsightsOptions {
|
|
64
|
-
/**
|
|
65
|
-
* Your LinkedIn Insight Tag partner ID.
|
|
66
|
-
*
|
|
67
|
-
* LinkedIn shows this in Campaign Manager under Data -> Signals manager ->
|
|
68
|
-
* Insight Tag.
|
|
69
|
-
*
|
|
70
|
-
* @example `123456789012345`
|
|
71
|
-
*/
|
|
72
|
-
id: string;
|
|
73
|
-
/** LinkedIn Insight Tag loader URL. */
|
|
74
|
-
scriptSrc?: string;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* LinkedIn Insight Tag script.
|
|
78
|
-
*
|
|
79
|
-
* @param options - The options for the LinkedIn Insight Tag script.
|
|
80
|
-
* @returns The LinkedIn Insight Tag script configuration.
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* ```ts
|
|
84
|
-
* const linkedinInsightsScript = linkedinInsights({
|
|
85
|
-
* id: '123456789012345',
|
|
86
|
-
* });
|
|
87
|
-
* ```
|
|
88
|
-
*
|
|
89
|
-
* @see {@link https://www.linkedin.com/help/lms/answer/a418880} Add the LinkedIn Insight Tag to your website
|
|
90
|
-
*/
|
|
91
|
-
export declare const linkedinInsights: ({ id, scriptSrc, }: LinkedInInsightsOptions) => Script;
|
|
92
|
-
export {};
|
|
1
|
+
/** @deprecated Use @c15t/integrations/vendors/ads-and-pixels/linkedin-insights. Compatibility ends in v4. */
|
|
2
|
+
export * from '@c15t/integrations/vendors/ads-and-pixels/linkedin-insights';
|