@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
|
@@ -1,101 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
interface Window {
|
|
4
|
-
LogRocket?: {
|
|
5
|
-
init: (appId: string, options?: Record<string, unknown>) => void;
|
|
6
|
-
identify?: (id: string, traits?: Record<string, unknown>) => void;
|
|
7
|
-
track?: (event: string, properties?: Record<string, unknown>) => void;
|
|
8
|
-
getSessionURL?: (callback: (sessionUrl: string) => void) => void;
|
|
9
|
-
start?: () => void;
|
|
10
|
-
startNewSession?: () => void;
|
|
11
|
-
uninstall?: () => void;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* LogRocket vendor manifest.
|
|
17
|
-
*
|
|
18
|
-
* Loads the browser SDK and initializes it after the loader fires its `load`
|
|
19
|
-
* event. LogRocket does not document a consent opt-out or stop-recording API
|
|
20
|
-
* for the web SDK, so c15t gates the loader on measurement consent and unloads
|
|
21
|
-
* the script element when that consent is revoked.
|
|
22
|
-
*/
|
|
23
|
-
export declare const logRocketManifest: {
|
|
24
|
-
readonly kind: "c15t.vendor-manifest";
|
|
25
|
-
readonly schemaVersion: 1;
|
|
26
|
-
readonly afterLoad: [{
|
|
27
|
-
readonly args: ["{{appId}}", "{{initOptions}}"];
|
|
28
|
-
readonly global: 'LogRocket';
|
|
29
|
-
readonly method: 'init';
|
|
30
|
-
readonly type: 'callGlobal';
|
|
31
|
-
}];
|
|
32
|
-
readonly category: 'measurement';
|
|
33
|
-
readonly install: [{
|
|
34
|
-
readonly attributes: {
|
|
35
|
-
readonly crossorigin: 'anonymous';
|
|
36
|
-
};
|
|
37
|
-
readonly src: '{{scriptUrl}}';
|
|
38
|
-
readonly type: 'loadScript';
|
|
39
|
-
}];
|
|
40
|
-
readonly vendor: 'logrocket';
|
|
41
|
-
};
|
|
42
|
-
export interface LogRocketOptions {
|
|
43
|
-
/**
|
|
44
|
-
* Your LogRocket app ID in `org-slug/app-slug` format.
|
|
45
|
-
*/
|
|
46
|
-
appId: string;
|
|
47
|
-
/**
|
|
48
|
-
* LogRocket init options passed as the second `LogRocket.init()` argument.
|
|
49
|
-
*
|
|
50
|
-
* The manifest engine serializes this object as a template variable, so use
|
|
51
|
-
* JSON-serializable values only (no functions, class instances, prototypes,
|
|
52
|
-
* `Map`, `Set`, or other non-JSON types).
|
|
53
|
-
*/
|
|
54
|
-
initOptions?: Record<string, unknown>;
|
|
55
|
-
/**
|
|
56
|
-
* Custom LogRocket loader URL.
|
|
57
|
-
* @default 'https://cdn.logrocket.io/LogRocket.min.js'
|
|
58
|
-
*/
|
|
59
|
-
scriptUrl?: string;
|
|
60
|
-
/**
|
|
61
|
-
* Proxied URL for LogRocket's asynchronously loaded logger bundle.
|
|
62
|
-
*
|
|
63
|
-
* LogRocket's proxy setup requires `window._lrAsyncScript` in addition to
|
|
64
|
-
* the main `scriptUrl`, because the SDK chain-loads its logger bundle from
|
|
65
|
-
* this location. Only needed when proxying traffic through your own
|
|
66
|
-
* domain.
|
|
67
|
-
*
|
|
68
|
-
* @see https://docs.logrocket.com/docs/proxying-traffic-through-your-own-domain
|
|
69
|
-
*/
|
|
70
|
-
asyncScriptUrl?: string;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Creates a LogRocket script.
|
|
74
|
-
*
|
|
75
|
-
* @see https://docs.logrocket.com/reference/init
|
|
76
|
-
*
|
|
77
|
-
* @param options - The options for the LogRocket script.
|
|
78
|
-
* @returns The LogRocket script.
|
|
79
|
-
* @throws {Error} When `appId` is missing, empty, or not in `org/app` format.
|
|
80
|
-
* Provide the app ID from LogRocket Project Setup to prevent this error.
|
|
81
|
-
*
|
|
82
|
-
* @remarks
|
|
83
|
-
* LogRocket records session replay and monitoring data. Configure LogRocket's
|
|
84
|
-
* privacy and sanitization options before deployment so sensitive DOM, input,
|
|
85
|
-
* network, or application state data is excluded from recordings.
|
|
86
|
-
*
|
|
87
|
-
* @example
|
|
88
|
-
* ```ts
|
|
89
|
-
* import { logRocket } from '@c15t/scripts/logrocket';
|
|
90
|
-
*
|
|
91
|
-
* logRocket({
|
|
92
|
-
* appId: 'org-slug/app-slug',
|
|
93
|
-
* initOptions: {
|
|
94
|
-
* dom: {
|
|
95
|
-
* inputSanitizer: true,
|
|
96
|
-
* },
|
|
97
|
-
* },
|
|
98
|
-
* });
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
export declare const logRocket: (options: LogRocketOptions) => Script;
|
|
1
|
+
/** @deprecated Use @c15t/integrations/vendors/analytics/logrocket. Compatibility ends in v4. */
|
|
2
|
+
export * from '@c15t/integrations/vendors/analytics/logrocket';
|
|
@@ -1,41 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
declare global {
|
|
4
|
-
interface Window {
|
|
5
|
-
_paq?: unknown[];
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
export declare const matomoAnalyticsManifest: VendorManifest;
|
|
9
|
-
export interface MatomoAnalyticsOptions {
|
|
10
|
-
/** Your Matomo site ID. */
|
|
11
|
-
siteId?: string | number;
|
|
12
|
-
/** Your Matomo base URL, for example `https://analytics.example.com`. */
|
|
13
|
-
matomoUrl?: string;
|
|
14
|
-
/** Your Matomo Cloud identifier, for example `my-site.matomo.cloud`. */
|
|
15
|
-
cloudId?: string;
|
|
16
|
-
/** Optional explicit tracker endpoint override. */
|
|
17
|
-
trackerUrl?: string;
|
|
18
|
-
/** Optional explicit script URL override. */
|
|
19
|
-
scriptUrl?: string;
|
|
20
|
-
/** Queue `enableLinkTracking`. */
|
|
21
|
-
enableLinkTracking?: boolean;
|
|
22
|
-
/** Queue `disableCookies`. */
|
|
23
|
-
disableCookies?: boolean;
|
|
24
|
-
/** Queue an initial `trackPageView`. */
|
|
25
|
-
trackPageView?: boolean;
|
|
26
|
-
/** Default Matomo consent state (`required` blocks, `given` starts enabled). */
|
|
27
|
-
defaultConsent?: 'required' | 'given';
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Creates a Matomo Analytics script.
|
|
31
|
-
*
|
|
32
|
-
* @param options - The options for the Matomo Analytics script.
|
|
33
|
-
* @returns The Matomo Analytics script configuration.
|
|
34
|
-
* @throws {Error} Throws
|
|
35
|
-
* `'matomoAnalytics requires \`matomoUrl\`, \`cloudId\`, or explicit \`trackerUrl\` and \`scriptUrl\` values.'`
|
|
36
|
-
* when either resolved `trackerUrl` or `scriptUrl` is missing (for example,
|
|
37
|
-
* when neither `matomoUrl` nor `cloudId` is provided and explicit
|
|
38
|
-
* `trackerUrl`/`scriptUrl` values are not supplied). Provide `matomoUrl`, or
|
|
39
|
-
* provide both explicit `trackerUrl` and `scriptUrl`.
|
|
40
|
-
*/
|
|
41
|
-
export declare const matomoAnalytics: (options?: MatomoAnalyticsOptions) => Script;
|
|
1
|
+
/** @deprecated Use @c15t/integrations/vendors/analytics/matomo-analytics. Compatibility ends in v4. */
|
|
2
|
+
export * from '@c15t/integrations/vendors/analytics/matomo-analytics';
|
|
@@ -1,97 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Microsoft Clarity Consent V2 storage state.
|
|
4
|
-
*
|
|
5
|
-
* Clarity accepts string consent values instead of booleans for its granular
|
|
6
|
-
* `ad_Storage` and `analytics_Storage` channels.
|
|
7
|
-
*/
|
|
8
|
-
export type ClarityConsentState = 'granted' | 'denied';
|
|
9
|
-
/**
|
|
10
|
-
* Consent V2 payload sent to Microsoft Clarity.
|
|
11
|
-
*
|
|
12
|
-
* c15t maps `marketing` consent to `ad_Storage` and `measurement` consent to
|
|
13
|
-
* `analytics_Storage`.
|
|
14
|
-
*/
|
|
15
|
-
export interface ClarityConsentV2Payload {
|
|
16
|
-
ad_Storage: ClarityConsentState;
|
|
17
|
-
analytics_Storage: ClarityConsentState;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Optional boot-time consent override accepted by the Clarity helper.
|
|
21
|
-
*
|
|
22
|
-
* Booleans apply the same value to both Clarity Consent V2 channels. Object
|
|
23
|
-
* values may use Clarity keys or c15t category aliases and are merged over the
|
|
24
|
-
* current c15t consent state.
|
|
25
|
-
*/
|
|
26
|
-
export type ClarityConsentValue = boolean | Partial<Record<keyof ClarityConsentV2Payload | 'ad_storage' | 'analytics_storage' | 'marketing' | 'measurement' | 'analytics', ClarityConsentState | boolean>>;
|
|
27
|
-
interface ClarityFunction {
|
|
28
|
-
(command: 'consent', value?: boolean): void;
|
|
29
|
-
(command: 'consentv2', value: ClarityConsentV2Payload): void;
|
|
30
|
-
(command: 'event' | 'upgrade', value: string): void;
|
|
31
|
-
(command: 'identify', id: string, session?: string, page?: string): unknown;
|
|
32
|
-
(command: 'set', key: string, value: string | string[]): void;
|
|
33
|
-
(command: 'start', options?: Record<string, unknown>): void;
|
|
34
|
-
(command: string, ...args: unknown[]): unknown;
|
|
35
|
-
}
|
|
36
|
-
declare global {
|
|
37
|
-
interface Window {
|
|
38
|
-
clarity?: ClarityFunction & {
|
|
39
|
-
q?: unknown[][];
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Microsoft Clarity vendor manifest.
|
|
45
|
-
*
|
|
46
|
-
* Seeds the global queue stub before loading the vendor bundle and uses
|
|
47
|
-
* Clarity's Consent V2 API for granular analytics and ad storage transitions.
|
|
48
|
-
*/
|
|
49
|
-
export declare const clarityManifest: {
|
|
50
|
-
readonly kind: "c15t.vendor-manifest";
|
|
51
|
-
readonly schemaVersion: 1;
|
|
52
|
-
readonly bootstrap: [{
|
|
53
|
-
readonly ifUndefined: true;
|
|
54
|
-
readonly name: 'clarity';
|
|
55
|
-
readonly queue: {
|
|
56
|
-
readonly property: 'q';
|
|
57
|
-
};
|
|
58
|
-
readonly queueFormat: 'array';
|
|
59
|
-
readonly type: 'defineStubFunction';
|
|
60
|
-
}];
|
|
61
|
-
readonly category: 'measurement';
|
|
62
|
-
readonly install: [{
|
|
63
|
-
readonly async: true;
|
|
64
|
-
readonly src: '{{scriptUrl}}';
|
|
65
|
-
readonly type: 'loadScript';
|
|
66
|
-
}];
|
|
67
|
-
readonly persistAfterConsentRevoked: true;
|
|
68
|
-
readonly vendor: 'microsoft-clarity';
|
|
69
|
-
};
|
|
70
|
-
export interface ClarityOptions {
|
|
71
|
-
/**
|
|
72
|
-
* Your Microsoft Clarity project ID.
|
|
73
|
-
* @example `abcdef1234`
|
|
74
|
-
*/
|
|
75
|
-
id: string;
|
|
76
|
-
/**
|
|
77
|
-
* Optional initial Consent V2 value queued before the script loads.
|
|
78
|
-
*
|
|
79
|
-
* By default, c15t maps `measurement` to `analytics_Storage` and `marketing`
|
|
80
|
-
* to `ad_Storage`. Pass this only when boot-time consent must override the
|
|
81
|
-
* current c15t consent state.
|
|
82
|
-
*/
|
|
83
|
-
defaultConsent?: ClarityConsentValue;
|
|
84
|
-
/** Clarity loader URL. */
|
|
85
|
-
scriptUrl?: string;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Creates a Microsoft Clarity script.
|
|
89
|
-
*
|
|
90
|
-
* @param options - The options for the Clarity script.
|
|
91
|
-
* @returns The Clarity script configuration.
|
|
92
|
-
* @throws {Error} When `options.id` is missing or invalid and no `scriptUrl`
|
|
93
|
-
* override is provided. Provide a valid Clarity project id string to prevent
|
|
94
|
-
* this error.
|
|
95
|
-
*/
|
|
96
|
-
export declare const clarity: ({ id, defaultConsent, scriptUrl, }: ClarityOptions) => Script;
|
|
97
|
-
export {};
|
|
1
|
+
/** @deprecated Use @c15t/integrations/vendors/analytics/microsoft-clarity. Compatibility ends in v4. */
|
|
2
|
+
export * from '@c15t/integrations/vendors/analytics/microsoft-clarity';
|
|
@@ -1,113 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
interface Window {
|
|
4
|
-
mixpanel?: {
|
|
5
|
-
init: (token: string, config?: Record<string, unknown>) => void;
|
|
6
|
-
track: (event: string, properties?: Record<string, unknown>) => void;
|
|
7
|
-
identify: (distinctId: string) => void;
|
|
8
|
-
reset: () => void;
|
|
9
|
-
register: (properties: Record<string, unknown>) => void;
|
|
10
|
-
opt_in_tracking: () => void;
|
|
11
|
-
opt_out_tracking: () => void;
|
|
12
|
-
/** Snippet version marker consumed by `init_from_snippet`. */
|
|
13
|
-
__SV?: number;
|
|
14
|
-
/** Pending `[token, config, instanceName]` init tuples consumed at SDK load. */
|
|
15
|
-
_i?: unknown[][];
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Mixpanel vendor manifest.
|
|
21
|
-
*
|
|
22
|
-
* Implements the official snippet contract: the stub array carries the
|
|
23
|
-
* snippet version marker (`__SV`) and the pending `[token, config, 'mixpanel']`
|
|
24
|
-
* init tuple in `_i`, which `mixpanel-2-latest.min.js` consumes at load time via
|
|
25
|
-
* `init_from_snippet`. Without `__SV` the SDK logs "Mixpanel error: Version
|
|
26
|
-
* mismatch" and never initializes, silently dropping queued calls.
|
|
27
|
-
*
|
|
28
|
-
* Mixpanel can stay loaded across consent changes and toggle tracking with its
|
|
29
|
-
* own opt-in and opt-out APIs.
|
|
30
|
-
*/
|
|
31
|
-
export declare const mixpanelAnalyticsManifest: {
|
|
32
|
-
readonly kind: "c15t.vendor-manifest";
|
|
33
|
-
readonly schemaVersion: 1;
|
|
34
|
-
readonly alwaysLoad: true;
|
|
35
|
-
readonly category: 'measurement';
|
|
36
|
-
readonly install: [{
|
|
37
|
-
readonly ifUndefined: true;
|
|
38
|
-
readonly name: 'mixpanel';
|
|
39
|
-
readonly type: 'setGlobal';
|
|
40
|
-
readonly value: readonly [];
|
|
41
|
-
}, {
|
|
42
|
-
readonly path: ["mixpanel", "__SV"];
|
|
43
|
-
readonly type: 'setGlobalPath';
|
|
44
|
-
readonly value: 1.2;
|
|
45
|
-
}, {
|
|
46
|
-
readonly path: ["mixpanel", "_i"];
|
|
47
|
-
readonly type: 'setGlobalPath';
|
|
48
|
-
readonly value: readonly [readonly ["{{token}}", "{{initOptions}}", "mixpanel"]];
|
|
49
|
-
}, {
|
|
50
|
-
readonly methods: ["track", "identify", "reset", "register", "opt_in_tracking", "opt_out_tracking"];
|
|
51
|
-
readonly target: 'mixpanel';
|
|
52
|
-
readonly type: 'defineQueueMethods';
|
|
53
|
-
}, {
|
|
54
|
-
readonly async: true;
|
|
55
|
-
readonly src: '{{scriptUrl}}';
|
|
56
|
-
readonly type: 'loadScript';
|
|
57
|
-
}];
|
|
58
|
-
readonly onConsentDenied: [{
|
|
59
|
-
readonly global: 'mixpanel';
|
|
60
|
-
readonly method: 'opt_out_tracking';
|
|
61
|
-
readonly type: 'callGlobal';
|
|
62
|
-
}];
|
|
63
|
-
readonly onConsentGranted: [{
|
|
64
|
-
readonly global: 'mixpanel';
|
|
65
|
-
readonly method: 'opt_in_tracking';
|
|
66
|
-
readonly type: 'callGlobal';
|
|
67
|
-
}];
|
|
68
|
-
readonly onLoadDenied: [{
|
|
69
|
-
readonly global: 'mixpanel';
|
|
70
|
-
readonly method: 'opt_out_tracking';
|
|
71
|
-
readonly type: 'callGlobal';
|
|
72
|
-
}];
|
|
73
|
-
readonly onLoadGranted: [{
|
|
74
|
-
readonly global: 'mixpanel';
|
|
75
|
-
readonly method: 'opt_in_tracking';
|
|
76
|
-
readonly type: 'callGlobal';
|
|
77
|
-
}];
|
|
78
|
-
readonly vendor: 'mixpanel-analytics';
|
|
79
|
-
};
|
|
80
|
-
export interface MixpanelAnalyticsOptions {
|
|
81
|
-
/** Your Mixpanel project token. */
|
|
82
|
-
token: string;
|
|
83
|
-
/**
|
|
84
|
-
* Mixpanel init options passed after the library loads.
|
|
85
|
-
*
|
|
86
|
-
* The manifest engine serializes this object as a template variable, so use
|
|
87
|
-
* JSON-serializable values only (no functions, class instances, prototypes,
|
|
88
|
-
* `Map`, `Set`, or other non-JSON types). Named instances and nested
|
|
89
|
-
* `people.*` queue helpers are intentionally out of scope for this helper.
|
|
90
|
-
*/
|
|
91
|
-
initOptions?: Record<string, unknown>;
|
|
92
|
-
/** Mixpanel loader URL. */
|
|
93
|
-
scriptUrl?: string;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Creates a Mixpanel Analytics script.
|
|
97
|
-
*
|
|
98
|
-
* @param options - The options for the Mixpanel Analytics script.
|
|
99
|
-
* @returns The Mixpanel Analytics script configuration.
|
|
100
|
-
* @throws {Error} Throws when `token` is not a non-empty 32-character
|
|
101
|
-
* hexadecimal Mixpanel project token.
|
|
102
|
-
*
|
|
103
|
-
* @example
|
|
104
|
-
* ```ts
|
|
105
|
-
* import { mixpanelAnalytics } from '@c15t/scripts/mixpanel-analytics';
|
|
106
|
-
*
|
|
107
|
-
* const script = mixpanelAnalytics({
|
|
108
|
-
* token: '1234567890abcdef1234567890abcdef',
|
|
109
|
-
* initOptions: { debug: true },
|
|
110
|
-
* });
|
|
111
|
-
* ```
|
|
112
|
-
*/
|
|
113
|
-
export declare const mixpanelAnalytics: ({ token, initOptions, scriptUrl, }: MixpanelAnalyticsOptions) => Script;
|
|
1
|
+
/** @deprecated Use @c15t/integrations/vendors/analytics/mixpanel-analytics. Compatibility ends in v4. */
|
|
2
|
+
export * from '@c15t/integrations/vendors/analytics/mixpanel-analytics';
|
|
@@ -1,39 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare const ONE_DOLLAR_STATS_SCRIPT_SRC = "https://assets.onedollarstats.com/stonks.js";
|
|
4
|
-
/** OneDollarStats is loaded only after measurement consent is granted. */
|
|
5
|
-
export declare const oneDollarStatsManifest: {
|
|
6
|
-
readonly kind: "c15t.vendor-manifest";
|
|
7
|
-
readonly schemaVersion: 1;
|
|
8
|
-
readonly category: 'measurement';
|
|
9
|
-
readonly install: [{
|
|
10
|
-
readonly defer: true;
|
|
11
|
-
readonly src: "https://assets.onedollarstats.com/stonks.js";
|
|
12
|
-
readonly type: 'loadScript';
|
|
13
|
-
}];
|
|
14
|
-
readonly vendor: 'one-dollar-stats';
|
|
15
|
-
};
|
|
16
|
-
export interface OneDollarStatsOptions {
|
|
17
|
-
/**
|
|
18
|
-
* Bare hostname, such as `docs.example.com`. Overrides the event hostname
|
|
19
|
-
* on every host, including production. Required for local dev mode.
|
|
20
|
-
*/
|
|
21
|
-
hostname?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Tracker settings forwarded as `data-*` attributes. Use string values,
|
|
24
|
-
* e.g. `devmode: 'true'`, `autocollect: 'false'`, or a custom `url`.
|
|
25
|
-
* Setting `'hash-routing': 'false'` omits the presence-based attribute.
|
|
26
|
-
*/
|
|
27
|
-
[setting: string]: string | undefined;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Creates a consent-gated OneDollarStats script. No API key is required.
|
|
31
|
-
* The tracker reads data attributes from `document.currentScript` and
|
|
32
|
-
* handles client-side navigation itself.
|
|
33
|
-
*
|
|
34
|
-
* @param options - Tracker settings without the `data-` prefix.
|
|
35
|
-
* @returns The OneDollarStats script configuration.
|
|
36
|
-
* @throws {Error} When hostname is not a bare host, or a setting name is not
|
|
37
|
-
* a valid attribute name or its value is not a string.
|
|
38
|
-
*/
|
|
39
|
-
export declare const oneDollarStats: (options?: OneDollarStatsOptions) => Script;
|
|
1
|
+
/** @deprecated Use @c15t/integrations/vendors/analytics/one-dollar-stats. Compatibility ends in v4. */
|
|
2
|
+
export * from '@c15t/integrations/vendors/analytics/one-dollar-stats';
|
|
@@ -1,96 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
interface Window {
|
|
4
|
-
pirsch?: (eventName: string, options?: {
|
|
5
|
-
duration?: number;
|
|
6
|
-
meta?: Record<string, unknown>;
|
|
7
|
-
non_interactive?: boolean;
|
|
8
|
-
}) => Promise<null | undefined>;
|
|
9
|
-
pirschClearSession?: () => void;
|
|
10
|
-
pirschInit?: () => void;
|
|
11
|
-
pirschNotFound?: () => void;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Pirsch vendor manifest.
|
|
16
|
-
*
|
|
17
|
-
* Configures Pirsch through script attributes. Pirsch finds the script element
|
|
18
|
-
* by a fixed element id, so the `id` attribute is part of the loader contract.
|
|
19
|
-
*/
|
|
20
|
-
export declare const pirschManifest: {
|
|
21
|
-
readonly kind: "c15t.vendor-manifest";
|
|
22
|
-
readonly schemaVersion: 1;
|
|
23
|
-
readonly category: 'measurement';
|
|
24
|
-
readonly install: [{
|
|
25
|
-
readonly attributes: {
|
|
26
|
-
readonly 'data-code': '{{identificationCode}}';
|
|
27
|
-
readonly 'data-dev': '{{dev}}';
|
|
28
|
-
readonly 'data-disable-page-views': '{{disablePageViews}}';
|
|
29
|
-
readonly 'data-domain': '{{domain}}';
|
|
30
|
-
readonly 'data-event-endpoint': '{{eventEndpoint}}';
|
|
31
|
-
readonly 'data-hit-endpoint': '{{hitEndpoint}}';
|
|
32
|
-
readonly id: '{{scriptElementId}}';
|
|
33
|
-
};
|
|
34
|
-
readonly defer: true;
|
|
35
|
-
readonly src: '{{scriptUrl}}';
|
|
36
|
-
readonly type: 'loadScript';
|
|
37
|
-
}];
|
|
38
|
-
readonly vendor: 'pirsch';
|
|
39
|
-
};
|
|
40
|
-
export interface PirschOptions {
|
|
41
|
-
/**
|
|
42
|
-
* Your Pirsch identification code.
|
|
43
|
-
*/
|
|
44
|
-
identificationCode: string;
|
|
45
|
-
/**
|
|
46
|
-
* Additional dashboard domains, optionally including per-domain codes.
|
|
47
|
-
*
|
|
48
|
-
* Arrays are serialized as Pirsch's comma-separated `data-domain` value.
|
|
49
|
-
*/
|
|
50
|
-
domain?: string | string[];
|
|
51
|
-
/**
|
|
52
|
-
* Enable localhost testing by rewriting the tracked hostname.
|
|
53
|
-
*/
|
|
54
|
-
dev?: string;
|
|
55
|
-
/**
|
|
56
|
-
* Custom pageview endpoint.
|
|
57
|
-
*/
|
|
58
|
-
hitEndpoint?: string;
|
|
59
|
-
/**
|
|
60
|
-
* Custom event endpoint.
|
|
61
|
-
*/
|
|
62
|
-
eventEndpoint?: string;
|
|
63
|
-
/**
|
|
64
|
-
* Disable automatic pageview tracking.
|
|
65
|
-
*/
|
|
66
|
-
disablePageViews?: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Load Pirsch's extended script variant.
|
|
69
|
-
*/
|
|
70
|
-
extended?: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Custom loader URL.
|
|
73
|
-
*/
|
|
74
|
-
scriptUrl?: string;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Creates a Pirsch Analytics script.
|
|
78
|
-
*
|
|
79
|
-
* @see https://docs.pirsch.io/get-started/frontend-integration
|
|
80
|
-
*
|
|
81
|
-
* @param options - The options for the Pirsch script.
|
|
82
|
-
* @returns The Pirsch script.
|
|
83
|
-
* @throws {Error} When `identificationCode` is missing, empty, or invalid.
|
|
84
|
-
* Provide a valid non-empty `identificationCode` string to prevent this error.
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```ts
|
|
88
|
-
* import { pirsch } from '@c15t/scripts/pirsch';
|
|
89
|
-
*
|
|
90
|
-
* pirsch({
|
|
91
|
-
* identificationCode: 'YOUR_IDENTIFICATION_CODE',
|
|
92
|
-
* domain: 'rollup.example.com:ROLLUP_CODE',
|
|
93
|
-
* });
|
|
94
|
-
* ```
|
|
95
|
-
*/
|
|
96
|
-
export declare const pirsch: (options: PirschOptions) => Script;
|
|
1
|
+
/** @deprecated Use @c15t/integrations/vendors/analytics/pirsch. Compatibility ends in v4. */
|
|
2
|
+
export * from '@c15t/integrations/vendors/analytics/pirsch';
|
|
@@ -1,122 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export interface PlausibleInitOptions {
|
|
4
|
-
customProperties?: Record<string, unknown>;
|
|
5
|
-
endpoint?: string;
|
|
6
|
-
fileDownloads?: {
|
|
7
|
-
fileExtensions?: string[];
|
|
8
|
-
};
|
|
9
|
-
hashBasedRouting?: boolean;
|
|
10
|
-
autoCapturePageviews?: boolean;
|
|
11
|
-
captureOnLocalhost?: boolean;
|
|
12
|
-
}
|
|
13
|
-
declare global {
|
|
14
|
-
interface Window {
|
|
15
|
-
plausible?: ((...args: unknown[]) => void) & {
|
|
16
|
-
o?: PlausibleInitOptions;
|
|
17
|
-
q?: unknown[][];
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Plausible Analytics vendor manifest.
|
|
23
|
-
*
|
|
24
|
-
* Seeds a small queue stub so early `window.plausible(...)` calls can be
|
|
25
|
-
* buffered before the real tracker loads. Plausible is cookieless and only
|
|
26
|
-
* tracks page views, so the script is gated on `measurement` consent and is
|
|
27
|
-
* unloaded when consent is revoked.
|
|
28
|
-
*/
|
|
29
|
-
export declare const plausibleAnalyticsManifest: {
|
|
30
|
-
readonly kind: "c15t.vendor-manifest";
|
|
31
|
-
readonly schemaVersion: 1;
|
|
32
|
-
readonly bootstrap: [{
|
|
33
|
-
readonly ifUndefined: true;
|
|
34
|
-
readonly name: 'plausible';
|
|
35
|
-
readonly properties: {
|
|
36
|
-
readonly o: '{{initOptions}}';
|
|
37
|
-
};
|
|
38
|
-
readonly queue: {
|
|
39
|
-
readonly property: 'q';
|
|
40
|
-
};
|
|
41
|
-
readonly queueFormat: 'array';
|
|
42
|
-
readonly type: 'defineStubFunction';
|
|
43
|
-
}];
|
|
44
|
-
readonly category: 'measurement';
|
|
45
|
-
readonly install: [{
|
|
46
|
-
readonly attributes: {
|
|
47
|
-
readonly 'data-api': '{{apiAttribute}}';
|
|
48
|
-
readonly 'data-domain': '{{domain}}';
|
|
49
|
-
};
|
|
50
|
-
readonly defer: true;
|
|
51
|
-
readonly src: '{{scriptUrl}}';
|
|
52
|
-
readonly type: 'loadScript';
|
|
53
|
-
}];
|
|
54
|
-
readonly vendor: 'plausible-analytics';
|
|
55
|
-
};
|
|
56
|
-
export interface PlausibleAnalyticsOptions {
|
|
57
|
-
/**
|
|
58
|
-
* Unique Plausible script ID for the new script format.
|
|
59
|
-
*/
|
|
60
|
-
scriptId?: string;
|
|
61
|
-
/**
|
|
62
|
-
* Legacy domain-based site identifier.
|
|
63
|
-
*/
|
|
64
|
-
domain?: string;
|
|
65
|
-
/**
|
|
66
|
-
* Legacy script extensions.
|
|
67
|
-
*/
|
|
68
|
-
extension?: PlausibleExtension | PlausibleExtension[];
|
|
69
|
-
/**
|
|
70
|
-
* Properties tracked with each pageview.
|
|
71
|
-
*/
|
|
72
|
-
customProperties?: Record<string, unknown>;
|
|
73
|
-
/**
|
|
74
|
-
* Custom tracking endpoint.
|
|
75
|
-
*/
|
|
76
|
-
endpoint?: string;
|
|
77
|
-
/**
|
|
78
|
-
* File download tracking configuration.
|
|
79
|
-
*/
|
|
80
|
-
fileDownloads?: {
|
|
81
|
-
fileExtensions?: string[];
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* Enable hash-based routing support.
|
|
85
|
-
*/
|
|
86
|
-
hashBasedRouting?: boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Disable automatic pageview capture when set to `false`.
|
|
89
|
-
*/
|
|
90
|
-
autoCapturePageviews?: boolean;
|
|
91
|
-
/**
|
|
92
|
-
* Enable tracking on localhost.
|
|
93
|
-
*/
|
|
94
|
-
captureOnLocalhost?: boolean;
|
|
95
|
-
/**
|
|
96
|
-
* Custom loader URL.
|
|
97
|
-
*/
|
|
98
|
-
scriptUrl?: string;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Creates a Plausible Analytics script.
|
|
102
|
-
*
|
|
103
|
-
* Models Plausible's queue bootstrap and loader attributes as a c15t-managed
|
|
104
|
-
* script. Supports both the new `scriptId`-based loader and the legacy
|
|
105
|
-
* `domain` + extension-based loader.
|
|
106
|
-
*
|
|
107
|
-
* @see https://plausible.io/docs/script-extensions
|
|
108
|
-
*
|
|
109
|
-
* @param options - The options for the Plausible Analytics script.
|
|
110
|
-
* @returns The Plausible Analytics script.
|
|
111
|
-
*
|
|
112
|
-
* @example
|
|
113
|
-
* ```ts
|
|
114
|
-
* import { plausibleAnalytics } from '@c15t/scripts/plausible-analytics';
|
|
115
|
-
*
|
|
116
|
-
* plausibleAnalytics({
|
|
117
|
-
* domain: 'example.com',
|
|
118
|
-
* extension: ['file-downloads', 'outbound-links'],
|
|
119
|
-
* });
|
|
120
|
-
* ```
|
|
121
|
-
*/
|
|
122
|
-
export declare const plausibleAnalytics: (options: PlausibleAnalyticsOptions) => Script;
|
|
1
|
+
/** @deprecated Use @c15t/integrations/vendors/analytics/plausible-analytics. Compatibility ends in v4. */
|
|
2
|
+
export * from '@c15t/integrations/vendors/analytics/plausible-analytics';
|