@c15t/scripts 3.0.0-alpha.1 → 3.0.0-alpha.3
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 -59
- 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 -137
- package/dist/engine/compile.js +2 -89
- package/dist/engine/runtime.js +2 -448
- package/dist/events.js +2 -0
- 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 -392
- 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 -0
- 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 -66
- 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 -0
- 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 -56
- 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 -0
- 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 -59
- 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 -0
- 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 -458
- 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 -0
- 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 -93
- 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 -0
- 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 -158
- 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 -0
- 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 -94
- package/dist-types/vercel-analytics.d.ts +2 -0
- package/dist-types/x-pixel.d.ts +2 -0
- package/docs/README.md +129 -59
- 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/concepts/consent-state.md +357 -0
- 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 -33
- package/docs/customization/recipes.md +839 -47
- 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 +166 -36
- package/docs/customization/translations.md +61 -3
- package/docs/frameworks/astro/embeds.md +160 -0
- package/docs/frameworks/astro/network-blocker.md +86 -0
- package/docs/frameworks/astro/scripts.md +146 -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 +119 -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 +137 -0
- package/docs/frameworks/sveltekit/embeds.md +103 -0
- package/docs/frameworks/sveltekit/network-blocker.md +149 -0
- package/docs/frameworks/sveltekit/scripts.md +141 -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 +168 -160
- package/docs/integrations/ahrefs-analytics.md +153 -155
- package/docs/integrations/amplitude.md +163 -157
- package/docs/integrations/building-integrations.md +136 -37
- package/docs/integrations/clearbit.md +155 -155
- package/docs/integrations/cloudflare-web-analytics.md +157 -157
- package/docs/integrations/cloudflare-zaraz.md +210 -262
- package/docs/integrations/crisp.md +165 -159
- package/docs/integrations/databuddy.md +158 -174
- package/docs/integrations/fathom-analytics.md +159 -157
- package/docs/integrations/front-chat.md +322 -0
- package/docs/integrations/google-maps.md +119 -84
- package/docs/integrations/google-tag-manager.md +179 -164
- package/docs/integrations/google-tag.md +164 -161
- package/docs/integrations/heap.md +164 -156
- package/docs/integrations/hightouch.md +162 -158
- package/docs/integrations/hotjar.md +160 -156
- package/docs/integrations/intercom.md +184 -154
- package/docs/integrations/klaviyo.md +486 -0
- package/docs/integrations/linkedin-insights.md +175 -151
- package/docs/integrations/logrocket.md +161 -157
- package/docs/integrations/matomo-analytics.md +189 -179
- package/docs/integrations/meta-pixel.md +189 -151
- package/docs/integrations/microsoft-clarity.md +164 -156
- package/docs/integrations/microsoft-uet.md +149 -155
- package/docs/integrations/mixpanel-analytics.md +156 -161
- package/docs/integrations/one-dollar-stats.md +306 -0
- package/docs/integrations/openai-pixel.md +205 -302
- package/docs/integrations/overview.md +143 -83
- package/docs/integrations/pinterest-tag.md +329 -0
- package/docs/integrations/pirsch.md +170 -160
- package/docs/integrations/plausible-analytics.md +173 -159
- package/docs/integrations/posthog.md +227 -242
- package/docs/integrations/promptwatch.md +155 -155
- package/docs/integrations/reddit-pixel.md +186 -158
- package/docs/integrations/rudderstack.md +202 -187
- package/docs/integrations/rybbit-analytics.md +172 -161
- package/docs/integrations/segment.md +183 -155
- package/docs/integrations/snapchat-pixel.md +187 -157
- package/docs/integrations/tiktok-pixel.md +172 -151
- package/docs/integrations/umami-analytics.md +164 -159
- package/docs/integrations/vercel-analytics.md +167 -158
- package/docs/integrations/x-pixel.md +177 -151
- package/docs/integrations/youtube.md +122 -87
- package/docs/upgrade-v3.md +490 -354
- package/package.json +12 -236
- 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 -94
- package/docs/frameworks/next/script-loader.md +0 -210
- package/docs/frameworks/react/script-loader.md +0 -63
- package/docs/guides/consent-state.md +0 -60
- package/docs/guides/deployment-modes.md +0 -75
- package/docs/integrations/clear-on-revocation.md +0 -167
- package/docs/integrations/granular-consent.md +0 -208
|
@@ -1,210 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Reddit Pixel standard conversion event names.
|
|
4
|
-
*
|
|
5
|
-
* @see {@link https://business.reddithelp.com/s/article/supported-conversion-events | Reddit supported conversion events}
|
|
6
|
-
*/
|
|
7
|
-
export type RedditPixelEventName = 'PageVisit' | 'ViewContent' | 'Search' | 'AddToCart' | 'AddToWishlist' | 'Purchase' | 'Lead' | 'SignUp';
|
|
8
|
-
/**
|
|
9
|
-
* Controls Reddit Pixel automatic advanced matching signals.
|
|
10
|
-
*
|
|
11
|
-
* @see {@link https://business.reddithelp.com/s/article/reddit-pixel | Reddit Pixel setup}
|
|
12
|
-
*/
|
|
13
|
-
export interface RedditPixelAdvancedMatchingOptions {
|
|
14
|
-
/** Automatically scan page content for email addresses. */
|
|
15
|
-
email?: boolean;
|
|
16
|
-
/** Automatically scan page content for phone numbers. */
|
|
17
|
-
phone_number?: boolean;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Reddit Pixel initialization options.
|
|
21
|
-
*
|
|
22
|
-
* @see {@link https://business.reddithelp.com/s/article/reddit-pixel | Reddit Pixel setup}
|
|
23
|
-
* @see {@link https://business.reddithelp.com/s/article/Limited-Data-Use | Reddit Limited Data Use}
|
|
24
|
-
*/
|
|
25
|
-
export interface RedditPixelInitOptions {
|
|
26
|
-
/**
|
|
27
|
-
* Opt the user out of Reddit Pixel tracking.
|
|
28
|
-
*
|
|
29
|
-
* Reddit sends this as `opt_out=1` on pixel requests.
|
|
30
|
-
*/
|
|
31
|
-
optOut?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Disable Reddit first-party cookies during initialization.
|
|
34
|
-
*/
|
|
35
|
-
disableFirstPartyCookies?: boolean;
|
|
36
|
-
/** Email address or SHA-256 email hash for attribution matching. */
|
|
37
|
-
email?: string;
|
|
38
|
-
/** Phone number or SHA-256 phone hash for attribution matching. */
|
|
39
|
-
phoneNumber?: string;
|
|
40
|
-
/** External user identifier or SHA-256 hash for attribution matching. */
|
|
41
|
-
externalId?: string;
|
|
42
|
-
/** Android Advertising ID or SHA-256 hash. */
|
|
43
|
-
aaid?: string;
|
|
44
|
-
/** iOS Identifier for Advertisers or SHA-256 hash. */
|
|
45
|
-
idfa?: string;
|
|
46
|
-
/** Automatic advanced matching controls. */
|
|
47
|
-
aam?: RedditPixelAdvancedMatchingOptions;
|
|
48
|
-
/**
|
|
49
|
-
* Data processing mode, including Reddit Limited Data Use values.
|
|
50
|
-
*
|
|
51
|
-
* @see {@link https://business.reddithelp.com/s/article/Limited-Data-Use | Reddit Limited Data Use}
|
|
52
|
-
*/
|
|
53
|
-
dpm?: string | string[];
|
|
54
|
-
/**
|
|
55
|
-
* Data processing country code.
|
|
56
|
-
*
|
|
57
|
-
* @see {@link https://business.reddithelp.com/s/article/Limited-Data-Use | Reddit Limited Data Use}
|
|
58
|
-
*/
|
|
59
|
-
dpcc?: string;
|
|
60
|
-
/**
|
|
61
|
-
* Data processing region code.
|
|
62
|
-
*
|
|
63
|
-
* @see {@link https://business.reddithelp.com/s/article/Limited-Data-Use | Reddit Limited Data Use}
|
|
64
|
-
*/
|
|
65
|
-
dprc?: string;
|
|
66
|
-
/** Integration partner name. */
|
|
67
|
-
partner?: string;
|
|
68
|
-
/** Integration partner version. */
|
|
69
|
-
partner_version?: string;
|
|
70
|
-
/** Source integration name reported to Reddit. */
|
|
71
|
-
integration?: 'reddit' | 'gtm' | (string & Record<never, never>);
|
|
72
|
-
/** Enable Reddit Pixel debug logging. */
|
|
73
|
-
debug?: boolean;
|
|
74
|
-
/**
|
|
75
|
-
* Send monetary `value` metadata as `valueDecimal`.
|
|
76
|
-
*
|
|
77
|
-
* @default true
|
|
78
|
-
*/
|
|
79
|
-
useDecimalCurrencyValues?: boolean;
|
|
80
|
-
[key: string]: unknown;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Metadata supported by Reddit Pixel conversion events.
|
|
84
|
-
*
|
|
85
|
-
* @see {@link https://business.reddithelp.com/s/article/about-event-metadata | Reddit event metadata}
|
|
86
|
-
* @see {@link https://business.reddithelp.com/s/article/manual-conversion-events-with-the-reddit-pixel | Reddit manual conversion events}
|
|
87
|
-
*/
|
|
88
|
-
export interface RedditPixelEventMetadata {
|
|
89
|
-
itemCount?: number | string;
|
|
90
|
-
value?: number | string;
|
|
91
|
-
valueDecimal?: number | string;
|
|
92
|
-
currency?: string;
|
|
93
|
-
transactionId?: string;
|
|
94
|
-
customEventName?: string;
|
|
95
|
-
products?: string | {
|
|
96
|
-
id?: string | number;
|
|
97
|
-
name?: string;
|
|
98
|
-
category?: string;
|
|
99
|
-
quantity?: number | string;
|
|
100
|
-
itemPrice?: number | string;
|
|
101
|
-
}[];
|
|
102
|
-
/**
|
|
103
|
-
* Conversion ID used to deduplicate Pixel events against Conversions API
|
|
104
|
-
* events.
|
|
105
|
-
*
|
|
106
|
-
* @see {@link https://business.reddithelp.com/s/article/event-deduplication | Reddit event deduplication}
|
|
107
|
-
*/
|
|
108
|
-
conversionId?: string;
|
|
109
|
-
[key: string]: unknown;
|
|
110
|
-
}
|
|
111
|
-
interface RedditPixelFunction {
|
|
112
|
-
(command: 'init', pixelId: string, options?: RedditPixelInitOptions): void;
|
|
113
|
-
(command: 'enableFirstPartyCookies' | 'disableFirstPartyCookies'): void;
|
|
114
|
-
(command: 'track', eventName: RedditPixelEventName | (string & Record<never, never>), properties?: RedditPixelEventMetadata): void;
|
|
115
|
-
(command: string, ...args: unknown[]): void;
|
|
116
|
-
}
|
|
117
|
-
declare global {
|
|
118
|
-
interface Window {
|
|
119
|
-
rdt?: RedditPixelFunction & {
|
|
120
|
-
callQueue?: unknown[][];
|
|
121
|
-
sendEvent?: (...args: unknown[]) => void;
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Reddit Pixel vendor manifest.
|
|
127
|
-
*
|
|
128
|
-
* Sets up Reddit's queue stub and optionally queues the standard page visit
|
|
129
|
-
* event before the external bundle loads.
|
|
130
|
-
*/
|
|
131
|
-
export declare const redditPixelManifest: {
|
|
132
|
-
readonly kind: "c15t.vendor-manifest";
|
|
133
|
-
readonly schemaVersion: 1;
|
|
134
|
-
readonly bootstrap: [{
|
|
135
|
-
readonly dispatchProperty: 'sendEvent';
|
|
136
|
-
readonly ifUndefined: true;
|
|
137
|
-
readonly name: 'rdt';
|
|
138
|
-
readonly queue: {
|
|
139
|
-
readonly property: 'callQueue';
|
|
140
|
-
};
|
|
141
|
-
readonly queueFormat: 'array';
|
|
142
|
-
readonly type: 'defineStubFunction';
|
|
143
|
-
}];
|
|
144
|
-
readonly category: 'marketing';
|
|
145
|
-
readonly install: [{
|
|
146
|
-
readonly args: ["init", "{{pixelId}}"];
|
|
147
|
-
readonly global: 'rdt';
|
|
148
|
-
readonly type: 'callGlobal';
|
|
149
|
-
}, {
|
|
150
|
-
readonly args: ["track", "PageVisit"];
|
|
151
|
-
readonly global: 'rdt';
|
|
152
|
-
readonly type: 'callGlobal';
|
|
153
|
-
}, {
|
|
154
|
-
readonly async: true;
|
|
155
|
-
readonly src: '{{scriptUrl}}';
|
|
156
|
-
readonly type: 'loadScript';
|
|
157
|
-
}];
|
|
158
|
-
readonly onConsentDenied: [{
|
|
159
|
-
readonly args: ["disableFirstPartyCookies"];
|
|
160
|
-
readonly global: 'rdt';
|
|
161
|
-
readonly type: 'callGlobal';
|
|
162
|
-
}];
|
|
163
|
-
readonly onConsentGranted: [{
|
|
164
|
-
readonly args: ["enableFirstPartyCookies"];
|
|
165
|
-
readonly global: 'rdt';
|
|
166
|
-
readonly type: 'callGlobal';
|
|
167
|
-
}];
|
|
168
|
-
readonly persistAfterConsentRevoked: true;
|
|
169
|
-
readonly vendor: 'reddit-pixel';
|
|
170
|
-
};
|
|
171
|
-
export interface RedditPixelOptions {
|
|
172
|
-
/**
|
|
173
|
-
* Your Reddit Pixel ID.
|
|
174
|
-
* @example `t2_abcdef`
|
|
175
|
-
*/
|
|
176
|
-
pixelId: string;
|
|
177
|
-
/**
|
|
178
|
-
* Queue the standard `PageVisit` event during setup.
|
|
179
|
-
* @default true
|
|
180
|
-
*/
|
|
181
|
-
trackPageVisit?: boolean;
|
|
182
|
-
/**
|
|
183
|
-
* Optional payload passed as the third argument to `rdt('init', ...)`.
|
|
184
|
-
*/
|
|
185
|
-
initOptions?: RedditPixelInitOptions;
|
|
186
|
-
/**
|
|
187
|
-
* Disable Reddit first-party cookies during setup.
|
|
188
|
-
*
|
|
189
|
-
* This is merged into `initOptions.disableFirstPartyCookies`.
|
|
190
|
-
*/
|
|
191
|
-
disableFirstPartyCookies?: boolean;
|
|
192
|
-
/** Reddit Pixel loader URL. */
|
|
193
|
-
scriptUrl?: string;
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Creates a Reddit Pixel script.
|
|
197
|
-
*
|
|
198
|
-
* @param options - The options for the Reddit Pixel script.
|
|
199
|
-
* @returns The Reddit Pixel script configuration.
|
|
200
|
-
*/
|
|
201
|
-
export declare const redditPixel: ({ pixelId, trackPageVisit, initOptions, disableFirstPartyCookies, scriptUrl, }: RedditPixelOptions) => Script;
|
|
202
|
-
/**
|
|
203
|
-
* Tracks a Reddit Pixel event.
|
|
204
|
-
*
|
|
205
|
-
* @param eventName - Reddit standard event name or a custom event name.
|
|
206
|
-
* @param metadata - Optional event metadata, including `conversionId` for
|
|
207
|
-
* Pixel plus Conversions API deduplication.
|
|
208
|
-
*/
|
|
209
|
-
export declare const redditPixelEvent: (eventName: RedditPixelEventName | (string & Record<never, never>), metadata?: RedditPixelEventMetadata) => void;
|
|
210
|
-
export {};
|
|
1
|
+
/** @deprecated Use @c15t/integrations/vendors/ads-and-pixels/reddit-pixel. Compatibility ends in v4. */
|
|
2
|
+
export * from '@c15t/integrations/vendors/ads-and-pixels/reddit-pixel';
|
|
@@ -1,171 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export interface SnapchatPixelEventProperties {
|
|
4
|
-
/** Total monetary value for commerce events such as `PURCHASE`. */
|
|
5
|
-
price?: number;
|
|
6
|
-
/**
|
|
7
|
-
* Event identifier used to deduplicate browser Pixel events against
|
|
8
|
-
* server-side Conversions API events.
|
|
9
|
-
*/
|
|
10
|
-
client_dedup_id?: string;
|
|
11
|
-
/** ISO 4217 currency code, for example `USD`. */
|
|
12
|
-
currency?: string;
|
|
13
|
-
/** Transaction/order identifier for purchase events. */
|
|
14
|
-
transaction_id?: string;
|
|
15
|
-
/** Product, SKU, or content identifiers associated with the event. */
|
|
16
|
-
item_ids?: string[];
|
|
17
|
-
/** Product or content category associated with the event. */
|
|
18
|
-
item_category?: string;
|
|
19
|
-
/** Free-form description for the event. */
|
|
20
|
-
description?: string;
|
|
21
|
-
/** Query text for `SEARCH` events. */
|
|
22
|
-
search_string?: string;
|
|
23
|
-
/** Number of items represented by the event. */
|
|
24
|
-
number_items?: number;
|
|
25
|
-
/** Whether payment information was available, represented as `0` or `1`. */
|
|
26
|
-
payment_info_available?: 0 | 1;
|
|
27
|
-
/** Signup method for `SIGN_UP` events. */
|
|
28
|
-
sign_up_method?: string;
|
|
29
|
-
/** Whether the action succeeded, represented as `0` or `1`. */
|
|
30
|
-
success?: 0 | 1;
|
|
31
|
-
/** Brand names associated with the event contents. */
|
|
32
|
-
brands?: string[];
|
|
33
|
-
/** Fulfillment method for commerce events. */
|
|
34
|
-
delivery_method?: 'in_store' | 'curbside' | 'delivery';
|
|
35
|
-
/** Customer lifecycle status associated with the event. */
|
|
36
|
-
customer_status?: 'new' | 'returning' | 'reactivated';
|
|
37
|
-
/** Optional custom tag for event segmentation in Snapchat. */
|
|
38
|
-
event_tag?: string;
|
|
39
|
-
[key: string]: unknown;
|
|
40
|
-
}
|
|
41
|
-
interface SnapchatPixelFunction {
|
|
42
|
-
(command: 'track', eventName: SnapchatPixelEventName | (string & Record<never, never>), properties?: SnapchatPixelEventProperties): void;
|
|
43
|
-
(command: 'init', pixelId: string, config?: Record<string, unknown>): void;
|
|
44
|
-
(command: string, ...args: unknown[]): void;
|
|
45
|
-
}
|
|
46
|
-
declare global {
|
|
47
|
-
interface Window {
|
|
48
|
-
snaptr?: SnapchatPixelFunction & {
|
|
49
|
-
handleRequest?: (...args: unknown[]) => void;
|
|
50
|
-
loaded?: boolean;
|
|
51
|
-
push?: Window['snaptr'];
|
|
52
|
-
queue?: unknown[][];
|
|
53
|
-
version?: string;
|
|
54
|
-
};
|
|
55
|
-
_snaptr?: Window['snaptr'];
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Snapchat Pixel vendor manifest.
|
|
60
|
-
*
|
|
61
|
-
* Uses a structured queue stub and queues `init` plus an optional
|
|
62
|
-
* `PAGE_VIEW` event before the vendor bundle loads.
|
|
63
|
-
*/
|
|
64
|
-
export declare const snapchatPixelManifest: {
|
|
65
|
-
readonly kind: "c15t.vendor-manifest";
|
|
66
|
-
readonly schemaVersion: 1;
|
|
67
|
-
readonly bootstrap: [{
|
|
68
|
-
readonly aliases: ["_snaptr"];
|
|
69
|
-
readonly dispatchProperty: 'handleRequest';
|
|
70
|
-
readonly ifUndefined: true;
|
|
71
|
-
readonly name: 'snaptr';
|
|
72
|
-
readonly properties: {
|
|
73
|
-
readonly loaded: true;
|
|
74
|
-
readonly version: '1.0';
|
|
75
|
-
};
|
|
76
|
-
readonly queue: {
|
|
77
|
-
readonly property: 'queue';
|
|
78
|
-
};
|
|
79
|
-
readonly queueFormat: 'array';
|
|
80
|
-
readonly selfReferences: ["push"];
|
|
81
|
-
readonly type: 'defineStubFunction';
|
|
82
|
-
}];
|
|
83
|
-
readonly category: 'marketing';
|
|
84
|
-
readonly install: [{
|
|
85
|
-
readonly args: ["init", "{{pixelId}}"];
|
|
86
|
-
readonly global: 'snaptr';
|
|
87
|
-
readonly type: 'callGlobal';
|
|
88
|
-
}, {
|
|
89
|
-
readonly args: ["track", "PAGE_VIEW"];
|
|
90
|
-
readonly global: 'snaptr';
|
|
91
|
-
readonly type: 'callGlobal';
|
|
92
|
-
}, {
|
|
93
|
-
readonly async: true;
|
|
94
|
-
readonly src: '{{scriptUrl}}';
|
|
95
|
-
readonly type: 'loadScript';
|
|
96
|
-
}];
|
|
97
|
-
readonly vendor: 'snapchat-pixel';
|
|
98
|
-
};
|
|
99
|
-
export interface SnapchatPixelOptions {
|
|
100
|
-
/**
|
|
101
|
-
* Your Snapchat Pixel ID.
|
|
102
|
-
* @example `123456789012345`
|
|
103
|
-
*/
|
|
104
|
-
pixelId: string;
|
|
105
|
-
/** Optional init payload passed to `snaptr('init', ...)`. */
|
|
106
|
-
initOptions?: Record<string, unknown>;
|
|
107
|
-
/**
|
|
108
|
-
* Queue the default `PAGE_VIEW` event during setup.
|
|
109
|
-
* @default true
|
|
110
|
-
*/
|
|
111
|
-
trackPageView?: boolean;
|
|
112
|
-
/** Snapchat Pixel loader URL. */
|
|
113
|
-
scriptUrl?: string;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Creates a Snapchat Pixel script.
|
|
117
|
-
*
|
|
118
|
-
* @param options.pixelId - Snapchat Pixel ID used in `snaptr('init', ...)`.
|
|
119
|
-
* Expected format is a numeric string (commonly 15 digits), for example
|
|
120
|
-
* `'123456789012345'`. This value is required and should come directly from
|
|
121
|
-
* Snapchat Ads Manager.
|
|
122
|
-
* @param options.initOptions - Optional object passed as the third argument to
|
|
123
|
-
* `snaptr('init', pixelId, initOptions)`, for advanced initialization values.
|
|
124
|
-
* Example: `{ user_email: 'user@example.com', user_phone_number: '+15551234567' }`.
|
|
125
|
-
* @param options.trackPageView - Whether to queue the default
|
|
126
|
-
* `snaptr('track', 'PAGE_VIEW')` call during setup. Defaults to `true`; set to
|
|
127
|
-
* `false` when you want to control page-view tracking manually.
|
|
128
|
-
* @returns A resolved c15t `Script` configuration that defines the Snapchat
|
|
129
|
-
* queue stub, runs `init` (and optionally `PAGE_VIEW`), and then loads the
|
|
130
|
-
* Snapchat SDK script URL.
|
|
131
|
-
* @throws {Error} `resolveManifest` may throw when required placeholders cannot be
|
|
132
|
-
* resolved (for example, when `pixelId` is missing/empty) or when provided
|
|
133
|
-
* manifest values are invalid for interpolation.
|
|
134
|
-
*
|
|
135
|
-
* Edge cases:
|
|
136
|
-
* - Missing `pixelId` causes manifest resolution to fail.
|
|
137
|
-
* - Non-numeric or malformed `pixelId` values may initialize incorrectly in
|
|
138
|
-
* Snapchat even if local script construction succeeds.
|
|
139
|
-
*
|
|
140
|
-
* @example
|
|
141
|
-
* ```ts
|
|
142
|
-
* const script = snapchatPixel({
|
|
143
|
-
* pixelId: '123456789012345',
|
|
144
|
-
* initOptions: {
|
|
145
|
-
* user_email: 'user@example.com',
|
|
146
|
-
* user_phone_number: '+15551234567',
|
|
147
|
-
* },
|
|
148
|
-
* trackPageView: false,
|
|
149
|
-
* });
|
|
150
|
-
* ```
|
|
151
|
-
*/
|
|
152
|
-
export declare const snapchatPixel: ({ pixelId, initOptions, trackPageView, scriptUrl, }: SnapchatPixelOptions) => Script;
|
|
153
|
-
/**
|
|
154
|
-
* Tracks a Snapchat Pixel event.
|
|
155
|
-
*
|
|
156
|
-
* @param eventName - Snapchat standard event name or a custom event name.
|
|
157
|
-
* @param properties - Optional event properties, including
|
|
158
|
-
* `client_dedup_id` for Pixel plus Conversions API deduplication.
|
|
159
|
-
*
|
|
160
|
-
* @example
|
|
161
|
-
* ```ts
|
|
162
|
-
* snapchatPixelEvent('PURCHASE', {
|
|
163
|
-
* price: 99,
|
|
164
|
-
* currency: 'USD',
|
|
165
|
-
* transaction_id: 'order-123',
|
|
166
|
-
* client_dedup_id: 'event-123',
|
|
167
|
-
* });
|
|
168
|
-
* ```
|
|
169
|
-
*/
|
|
170
|
-
export declare const snapchatPixelEvent: (eventName: SnapchatPixelEventName | (string & Record<never, never>), properties?: SnapchatPixelEventProperties) => void;
|
|
171
|
-
export {};
|
|
1
|
+
/** @deprecated Use @c15t/integrations/vendors/ads-and-pixels/snapchat-pixel. Compatibility ends in v4. */
|
|
2
|
+
export * from '@c15t/integrations/vendors/ads-and-pixels/snapchat-pixel';
|
|
@@ -1,106 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
grantConsent: () => void;
|
|
4
|
-
revokeConsent: () => void;
|
|
5
|
-
page: () => void;
|
|
6
|
-
track: (eventName: string, properties?: Record<string, unknown>) => void;
|
|
7
|
-
identify: (properties?: Record<string, unknown>) => void;
|
|
8
|
-
instances: (...args: unknown[]) => void;
|
|
9
|
-
debug: (...args: unknown[]) => void;
|
|
10
|
-
on: (...args: unknown[]) => void;
|
|
11
|
-
off: (...args: unknown[]) => void;
|
|
12
|
-
once: (...args: unknown[]) => void;
|
|
13
|
-
ready: (...args: unknown[]) => void;
|
|
14
|
-
alias: (...args: unknown[]) => void;
|
|
15
|
-
group: (...args: unknown[]) => void;
|
|
16
|
-
enableCookie: (...args: unknown[]) => void;
|
|
17
|
-
disableCookie: (...args: unknown[]) => void;
|
|
18
|
-
holdConsent: (...args: unknown[]) => void;
|
|
19
|
-
}
|
|
20
|
-
declare global {
|
|
21
|
-
interface Window {
|
|
22
|
-
ttq: TikTokPixelFunction;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* TikTok Pixel vendor manifest.
|
|
27
|
-
*
|
|
28
|
-
* Uses structured bootstrap steps and provides a consent API
|
|
29
|
-
* via `ttq.grantConsent()` / `ttq.revokeConsent()`.
|
|
30
|
-
*/
|
|
31
|
-
export declare const tiktokPixelManifest: {
|
|
32
|
-
readonly kind: "c15t.vendor-manifest";
|
|
33
|
-
readonly schemaVersion: 1;
|
|
34
|
-
readonly afterLoad: [{
|
|
35
|
-
readonly global: 'ttq';
|
|
36
|
-
readonly method: 'grantConsent';
|
|
37
|
-
readonly type: 'callGlobal';
|
|
38
|
-
}];
|
|
39
|
-
readonly bootstrap: [{
|
|
40
|
-
readonly name: 'TiktokAnalyticsObject';
|
|
41
|
-
readonly type: 'setGlobal';
|
|
42
|
-
readonly value: 'ttq';
|
|
43
|
-
}, {
|
|
44
|
-
readonly ifUndefined: true;
|
|
45
|
-
readonly name: 'ttq';
|
|
46
|
-
readonly type: 'setGlobal';
|
|
47
|
-
readonly value: readonly [];
|
|
48
|
-
}, {
|
|
49
|
-
readonly methods: ["page", "track", "identify", "instances", "debug", "on", "off", "once", "ready", "alias", "group", "enableCookie", "disableCookie", "holdConsent", "revokeConsent", "grantConsent"];
|
|
50
|
-
readonly target: 'ttq';
|
|
51
|
-
readonly type: 'defineQueueMethods';
|
|
52
|
-
}];
|
|
53
|
-
readonly category: 'marketing';
|
|
54
|
-
readonly install: [{
|
|
55
|
-
readonly global: 'ttq';
|
|
56
|
-
readonly method: 'grantConsent';
|
|
57
|
-
readonly type: 'callGlobal';
|
|
58
|
-
}, {
|
|
59
|
-
readonly global: 'ttq';
|
|
60
|
-
readonly method: 'page';
|
|
61
|
-
readonly type: 'callGlobal';
|
|
62
|
-
}, {
|
|
63
|
-
readonly async: true;
|
|
64
|
-
readonly src: '{{scriptSrc}}?sdkid={{pixelId}}&lib=ttq';
|
|
65
|
-
readonly type: 'loadScript';
|
|
66
|
-
}];
|
|
67
|
-
readonly onConsentDenied: [{
|
|
68
|
-
readonly global: 'ttq';
|
|
69
|
-
readonly method: 'revokeConsent';
|
|
70
|
-
readonly type: 'callGlobal';
|
|
71
|
-
}];
|
|
72
|
-
readonly onConsentGranted: [{
|
|
73
|
-
readonly global: 'ttq';
|
|
74
|
-
readonly method: 'grantConsent';
|
|
75
|
-
readonly type: 'callGlobal';
|
|
76
|
-
}];
|
|
77
|
-
readonly persistAfterConsentRevoked: true;
|
|
78
|
-
readonly vendor: 'tiktok-pixel';
|
|
79
|
-
};
|
|
80
|
-
export interface TikTokPixelOptions {
|
|
81
|
-
/**
|
|
82
|
-
* Your TikTok Pixel ID
|
|
83
|
-
* @example `123456789012345`
|
|
84
|
-
*/
|
|
85
|
-
pixelId: string;
|
|
86
|
-
/** TikTok Pixel loader base URL. */
|
|
87
|
-
scriptSrc?: string;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Creates a Tiktok Pixel script.
|
|
91
|
-
* This script is persistent after consent is revoked because it has built-in functionality to opt into and out of tracking based on consent, which allows us to not need to load the script again when consent is revoked.
|
|
92
|
-
*
|
|
93
|
-
* @param options - The options for the TikTok Pixel script
|
|
94
|
-
* @returns The TikTok Pixel script configuration
|
|
95
|
-
*
|
|
96
|
-
* @example
|
|
97
|
-
* ```ts
|
|
98
|
-
* const tiktokPixelScript = tiktokPixel({
|
|
99
|
-
* pixelId: '123456789012345',
|
|
100
|
-
* });
|
|
101
|
-
* ```
|
|
102
|
-
*
|
|
103
|
-
* @see {@link https://ads.tiktok.com/help/article/tiktok-pixel} TikTok Pixel documentation
|
|
104
|
-
*/
|
|
105
|
-
export declare const tiktokPixel: ({ pixelId, scriptSrc, }: TikTokPixelOptions) => Script;
|
|
106
|
-
export {};
|
|
1
|
+
/** @deprecated Use @c15t/integrations/vendors/ads-and-pixels/tiktok-pixel. Compatibility ends in v4. */
|
|
2
|
+
export * from '@c15t/integrations/vendors/ads-and-pixels/tiktok-pixel';
|
|
@@ -1,183 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
/**
|
|
4
|
-
* Type of the content
|
|
5
|
-
* @example "Animals & Pet Supplies > Pet Supplies > Cat Supplies > Cat Beds"
|
|
6
|
-
* @see https://www.google.com/basepages/producttype/taxonomy.en-US.txt
|
|
7
|
-
*/
|
|
8
|
-
content_type?: string;
|
|
9
|
-
/**
|
|
10
|
-
* ID of the content
|
|
11
|
-
* For product catalog users: please pass SKU
|
|
12
|
-
* For all other users: Please pass Global Trade Item Number (GTIN) if available, otherwise pass SKU
|
|
13
|
-
* @example "1234567890"
|
|
14
|
-
*/
|
|
15
|
-
content_id: string;
|
|
16
|
-
/**
|
|
17
|
-
* Name of a product or service
|
|
18
|
-
* @example "Cat Bed"
|
|
19
|
-
*/
|
|
20
|
-
content_name?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Price of a product or service
|
|
23
|
-
* @example 10.00
|
|
24
|
-
*/
|
|
25
|
-
content_price?: number;
|
|
26
|
-
/**
|
|
27
|
-
* Quantity of the content
|
|
28
|
-
* @example 1
|
|
29
|
-
*/
|
|
30
|
-
num_items?: number;
|
|
31
|
-
/**
|
|
32
|
-
* ID associated with a group of product variants
|
|
33
|
-
* @example "1234567890"
|
|
34
|
-
*/
|
|
35
|
-
content_group_id?: string;
|
|
36
|
-
}
|
|
37
|
-
export interface XPixelEvent {
|
|
38
|
-
/**
|
|
39
|
-
* Total value of the conversion event (ex: $ value of the transaction in case of a purchase, etc.)
|
|
40
|
-
* @example 10.00
|
|
41
|
-
*/
|
|
42
|
-
value?: number;
|
|
43
|
-
/**
|
|
44
|
-
* Currency of the conversion event
|
|
45
|
-
* ISO 4217 code (ex: USD, EUR, JPY, etc.)
|
|
46
|
-
* @example USD
|
|
47
|
-
*/
|
|
48
|
-
currency?: string;
|
|
49
|
-
/**
|
|
50
|
-
* Unique identifier for the event that can be used for deduplication purposes
|
|
51
|
-
* @example tw-xxxx-xxxx
|
|
52
|
-
*/
|
|
53
|
-
conversion_id?: string;
|
|
54
|
-
/**
|
|
55
|
-
* Search string of the conversion event
|
|
56
|
-
* @example "search query"
|
|
57
|
-
*/
|
|
58
|
-
search_string?: string;
|
|
59
|
-
/**
|
|
60
|
-
* Description of the conversion event
|
|
61
|
-
* @example "purchase"
|
|
62
|
-
*/
|
|
63
|
-
description?: string;
|
|
64
|
-
/**
|
|
65
|
-
* twclid of the conversion event
|
|
66
|
-
* The X Pixel already automatically passes twclid from URL or first-party cookie. This parameter can be optionally used to force attribution to a certain ad click.
|
|
67
|
-
* @example "twclid"
|
|
68
|
-
*/
|
|
69
|
-
twclid?: string;
|
|
70
|
-
/**
|
|
71
|
-
* Status of the conversion event
|
|
72
|
-
* Should be set to values like "started" or "completed".
|
|
73
|
-
* @example "completed"
|
|
74
|
-
*/
|
|
75
|
-
status?: 'started' | 'completed';
|
|
76
|
-
/**
|
|
77
|
-
* Email address used for user matching.
|
|
78
|
-
* The X Pixel hashes this value before transmission.
|
|
79
|
-
* @example "[email protected]"
|
|
80
|
-
*/
|
|
81
|
-
email_address?: string;
|
|
82
|
-
/**
|
|
83
|
-
* Phone number used for user matching.
|
|
84
|
-
* Include country code in E.164 format (for example, +11234567890).
|
|
85
|
-
* The X Pixel hashes this value before transmission.
|
|
86
|
-
* @example "+11234567890"
|
|
87
|
-
*/
|
|
88
|
-
phone_number?: string;
|
|
89
|
-
/**
|
|
90
|
-
* Content/products associated with the conversion event
|
|
91
|
-
* @example [{content_id: 'OT001', content_name: 'bird seed', content_price: 50, num_items: 1}]
|
|
92
|
-
* @see {@link XPixelContent}
|
|
93
|
-
*/
|
|
94
|
-
contents?: XPixelContent[];
|
|
95
|
-
}
|
|
96
|
-
declare global {
|
|
97
|
-
interface Window {
|
|
98
|
-
twq?: (event: string, ...args: unknown[]) => void;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* X (Twitter) Pixel vendor manifest.
|
|
103
|
-
*
|
|
104
|
-
* Uses structured startup steps to load the X tracking pixel.
|
|
105
|
-
* No consent API — the script simply loads or doesn't based on consent.
|
|
106
|
-
*/
|
|
107
|
-
export declare const xPixelManifest: {
|
|
108
|
-
readonly kind: "c15t.vendor-manifest";
|
|
109
|
-
readonly schemaVersion: 1;
|
|
110
|
-
readonly bootstrap: [{
|
|
111
|
-
readonly dispatchProperty: 'exe';
|
|
112
|
-
readonly ifUndefined: true;
|
|
113
|
-
readonly name: 'twq';
|
|
114
|
-
readonly properties: {
|
|
115
|
-
readonly version: '1.1';
|
|
116
|
-
};
|
|
117
|
-
readonly queue: {
|
|
118
|
-
readonly property: 'queue';
|
|
119
|
-
};
|
|
120
|
-
readonly type: 'defineStubFunction';
|
|
121
|
-
}];
|
|
122
|
-
readonly category: 'marketing';
|
|
123
|
-
readonly install: [{
|
|
124
|
-
readonly args: ["config", "{{pixelId}}"];
|
|
125
|
-
readonly global: 'twq';
|
|
126
|
-
readonly type: 'callGlobal';
|
|
127
|
-
}, {
|
|
128
|
-
readonly async: true;
|
|
129
|
-
readonly src: '{{scriptSrc}}';
|
|
130
|
-
readonly type: 'loadScript';
|
|
131
|
-
}];
|
|
132
|
-
readonly vendor: 'x-pixel';
|
|
133
|
-
};
|
|
134
|
-
export interface XPixelOptions {
|
|
135
|
-
/**
|
|
136
|
-
* Your X Pixel ID
|
|
137
|
-
* @example `123456789012345`
|
|
138
|
-
*/
|
|
139
|
-
pixelId: string;
|
|
140
|
-
/** X Pixel loader URL. */
|
|
141
|
-
scriptSrc?: string;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Creates an X Pixel script.
|
|
145
|
-
* This script loads only when consent is granted.
|
|
146
|
-
* X Pixel does not expose a consent update API, so c15t treats it as a standard consent-gated loader.
|
|
147
|
-
*
|
|
148
|
-
* @param options - The options for the X Pixel script
|
|
149
|
-
* @returns The X Pixel script configuration
|
|
150
|
-
*
|
|
151
|
-
* @example
|
|
152
|
-
* ```ts
|
|
153
|
-
* const xPixelScript = xPixel({
|
|
154
|
-
* pixelId: '123456789012345',
|
|
155
|
-
* });
|
|
156
|
-
* ```
|
|
157
|
-
*
|
|
158
|
-
* @see {@link https://business.x.com/en/help/campaign-measurement-and-analytics/conversion-tracking-for-websites} X conversion tracking documentation
|
|
159
|
-
*/
|
|
160
|
-
export declare const xPixel: ({ pixelId, scriptSrc, }: XPixelOptions) => Script;
|
|
161
|
-
/**
|
|
162
|
-
* @param eventId - The event ID to track
|
|
163
|
-
* @example 'tw-xxxx-xxxx'
|
|
164
|
-
* @param metadata - Optional metadata to track
|
|
165
|
-
*
|
|
166
|
-
* @example
|
|
167
|
-
* ```ts
|
|
168
|
-
* xPixelEvent('tw-xxxx-xxxx', {
|
|
169
|
-
* value: 200.00,
|
|
170
|
-
* currency: 'USD',
|
|
171
|
-
* contents: [
|
|
172
|
-
* {content_id: 'OT001', content_name: 'bird seed', content_price: 50, num_items: 1},
|
|
173
|
-
* {content_id: 'OT002', content_name: 'bird cage', content_price: 150, num_items: 1}
|
|
174
|
-
* ]
|
|
175
|
-
* });
|
|
176
|
-
* ```
|
|
177
|
-
*
|
|
178
|
-
* @see {@link https://business.x.com/en/help/campaign-measurement-and-analytics/conversion-tracking-for-websites#event-types-and-parameters}
|
|
179
|
-
* @throws {Error} Throws when `window` is unavailable or `window.twq` is not a
|
|
180
|
-
* function. Ensure marketing consent is granted and the X Pixel has loaded
|
|
181
|
-
* before calling this helper.
|
|
182
|
-
*/
|
|
183
|
-
export declare const xPixelEvent: (eventId: string, metadata?: XPixelEvent) => void;
|
|
1
|
+
/** @deprecated Use @c15t/integrations/vendors/ads-and-pixels/x-pixel. Compatibility ends in v4. */
|
|
2
|
+
export * from '@c15t/integrations/vendors/ads-and-pixels/x-pixel';
|