@c15t/react 2.0.4 → 2.2.0-canary-20260727202135
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +155 -0
- package/README.md +29 -14
- package/client/components/integrations.js +3 -0
- package/dist/components/consent-banner/atoms/overlay.cjs +1 -1
- package/dist/components/consent-banner/atoms/root.cjs +1 -1
- package/dist/components/consent-banner/components.cjs +1 -1
- package/dist/components/consent-banner/consent-banner.cjs +1 -1
- package/dist/components/consent-banner/error-boundary.cjs +1 -1
- package/dist/components/consent-banner/index.cjs +1 -1
- package/dist/components/consent-banner/policy-actions.cjs +1 -1
- package/dist/components/consent-dialog/atoms/card.cjs +1 -1
- package/dist/components/consent-dialog/atoms/overlay.cjs +1 -1
- package/dist/components/consent-dialog/atoms/root.cjs +1 -1
- package/dist/components/consent-dialog/consent-dialog.cjs +1 -1
- package/dist/components/consent-dialog/index.cjs +1 -1
- package/dist/components/consent-dialog-link/index.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/button.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/button.js +1 -1
- package/dist/components/consent-dialog-trigger/atoms/icon.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/root.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/text.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/toolbar.cjs +1 -0
- package/dist/components/consent-dialog-trigger/atoms/toolbar.js +1 -0
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.cjs +1 -0
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.js +1 -0
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger.cjs +1 -1
- package/dist/components/consent-dialog-trigger/index.cjs +1 -1
- package/dist/components/consent-dialog-trigger/index.js +1 -1
- package/dist/components/consent-dialog-trigger/use-draggable.cjs +1 -1
- package/dist/components/consent-preferences-link/consent-preferences-link.cjs +1 -1
- package/dist/components/consent-preferences-link/index.cjs +1 -1
- package/dist/components/consent-widget/atoms/accordion.cjs +1 -1
- package/dist/components/consent-widget/atoms/button.cjs +1 -1
- package/dist/components/consent-widget/atoms/footer.cjs +1 -1
- package/dist/components/consent-widget/atoms/root.cjs +1 -1
- package/dist/components/consent-widget/consent-widget.cjs +1 -1
- package/dist/components/consent-widget/index.cjs +1 -1
- package/dist/components/consent-widget/policy-actions.cjs +1 -1
- package/dist/components/frame/atoms.cjs +1 -1
- package/dist/components/frame/atoms.js +1 -1
- package/dist/components/frame/frame.cjs +1 -1
- package/dist/components/frame/index.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/button-group.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/card.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/description.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/footer.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/header.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/overlay.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/root.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/title.cjs +1 -1
- package/dist/components/iab-consent-banner/iab-consent-banner.cjs +1 -1
- package/dist/components/iab-consent-banner/iab-consent-banner.js +1 -1
- package/dist/components/iab-consent-banner/index.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/card.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/content.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/footer.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/header.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/overlay.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/purpose-item.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/root.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/stack-item.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/tabs.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/vendor-list.cjs +1 -1
- package/dist/components/iab-consent-dialog/hooks/use-gvl-data.cjs +1 -1
- package/dist/components/iab-consent-dialog/iab-consent-dialog.cjs +1 -1
- package/dist/components/iab-consent-dialog/index.cjs +1 -1
- package/dist/components/iab-consent-dialog/use-iab-translations.cjs +1 -1
- package/dist/components/integrations/google-map.cjs +1 -0
- package/dist/components/integrations/google-map.js +1 -0
- package/dist/components/integrations/index.cjs +1 -0
- package/dist/components/integrations/index.js +1 -0
- package/dist/components/integrations/shared.cjs +1 -0
- package/dist/components/integrations/shared.js +1 -0
- package/dist/components/integrations/youtube-embed.cjs +1 -0
- package/dist/components/integrations/youtube-embed.js +1 -0
- package/dist/components/shared/libs/recursive-clone-children.cjs +1 -1
- package/dist/components/shared/libs/slot.cjs +1 -1
- package/dist/components/shared/libs/use-controllable-state.cjs +1 -1
- package/dist/components/shared/policy-actions.cjs +1 -1
- package/dist/components/shared/primitives/box.cjs +1 -1
- package/dist/components/shared/primitives/button.cjs +1 -1
- package/dist/components/shared/primitives/button.js +1 -1
- package/dist/components/shared/primitives/legal-links/index.cjs +1 -1
- package/dist/components/shared/primitives/legal-links/index.js +1 -1
- package/dist/components/shared/ui/accordion/accordion.cjs +1 -1
- package/dist/components/shared/ui/accordion/index.cjs +1 -1
- package/dist/components/shared/ui/animated-collapse/animated-collapse.cjs +1 -1
- package/dist/components/shared/ui/animated-collapse/index.cjs +1 -1
- package/dist/components/shared/ui/branding.cjs +1 -1
- package/dist/components/shared/ui/button/button.cjs +1 -1
- package/dist/components/shared/ui/button/index.cjs +1 -1
- package/dist/components/shared/ui/collapsible/collapsible.cjs +1 -1
- package/dist/components/shared/ui/collapsible/index.cjs +1 -1
- package/dist/components/shared/ui/dialog/dialog.cjs +1 -1
- package/dist/components/shared/ui/dialog/index.cjs +1 -1
- package/dist/components/shared/ui/icon.cjs +1 -1
- package/dist/components/shared/ui/logo.cjs +1 -1
- package/dist/components/shared/ui/preference-item/index.cjs +1 -1
- package/dist/components/shared/ui/preference-item/preference-item.cjs +1 -1
- package/dist/components/shared/ui/switch/index.cjs +1 -1
- package/dist/components/shared/ui/switch/switch.cjs +1 -1
- package/dist/components/shared/ui/tabs/index.cjs +1 -1
- package/dist/components/shared/ui/tabs/tabs.cjs +1 -1
- package/dist/context/consent-manager-context.cjs +1 -1
- package/dist/context/consent-tracking-context.cjs +1 -1
- package/dist/context/theme-context.cjs +1 -1
- package/dist/headless.cjs +1 -1
- package/dist/headless.js +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-color-scheme.cjs +1 -1
- package/dist/hooks/use-component-config.cjs +1 -1
- package/dist/hooks/use-consent-dialog-trigger.cjs +1 -1
- package/dist/hooks/use-consent-manager.cjs +1 -1
- package/dist/hooks/use-consent-script.cjs +1 -0
- package/dist/hooks/use-consent-script.js +1 -0
- package/dist/hooks/use-focus-trap.cjs +1 -1
- package/dist/hooks/use-headless-consent-ui.cjs +1 -1
- package/dist/hooks/use-headless-iab-consent-ui.cjs +1 -1
- package/dist/hooks/use-reduced-motion.cjs +1 -1
- package/dist/hooks/use-scroll-lock.cjs +1 -1
- package/dist/hooks/use-ssr-status.cjs +1 -1
- package/dist/hooks/use-styles.cjs +1 -1
- package/dist/hooks/use-text-direction.cjs +1 -1
- package/dist/hooks/use-theme.cjs +1 -1
- package/dist/hooks/use-translations.cjs +1 -1
- package/dist/iab.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/primitives/accordion.cjs +1 -1
- package/dist/primitives/button.cjs +1 -1
- package/dist/primitives/collapsible.cjs +1 -1
- package/dist/primitives/dialog.cjs +1 -1
- package/dist/primitives/preference-item.cjs +1 -1
- package/dist/primitives/switch.cjs +1 -1
- package/dist/primitives/tabs.cjs +1 -1
- package/dist/primitives.cjs +1 -1
- package/dist/providers/consent-manager-provider.cjs +1 -1
- package/dist/server/fetch-ssr-data.cjs +1 -1
- package/dist/server/fetch-ssr-data.js +1 -1
- package/dist/server/headers.cjs +1 -1
- package/dist/server/headers.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/init-cache-key.cjs +1 -1
- package/dist/server/normalize-url.cjs +1 -1
- package/dist/styles.tw3.css +1 -1
- package/dist/types/theme/index.cjs +1 -1
- package/dist/types/theme/style-types.cjs +1 -1
- package/dist/utils/cn.cjs +1 -1
- package/dist/utils/merge-styles.cjs +1 -1
- package/dist/utils/test-helpers.cjs +1 -1
- package/dist/utils/theme-utils.cjs +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist-types/components/consent-banner/components.d.ts +2 -2
- package/dist-types/components/consent-banner/policy-actions.d.ts +1 -1
- package/dist-types/components/consent-dialog/atoms/card.d.ts +5 -5
- package/dist-types/components/consent-dialog-trigger/atoms/toolbar.d.ts +22 -0
- package/dist-types/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.d.ts +35 -0
- package/dist-types/components/consent-dialog-trigger/index.d.ts +2 -1
- package/dist-types/components/consent-dialog-trigger/types.d.ts +111 -6
- package/dist-types/components/consent-widget/atoms/accordion.d.ts +4 -4
- package/dist-types/components/consent-widget/consent-widget.d.ts +1 -1
- package/dist-types/components/consent-widget/policy-actions.d.ts +1 -1
- package/dist-types/components/integrations/google-map.d.ts +82 -0
- package/dist-types/components/integrations/index.d.ts +2 -0
- package/dist-types/components/integrations/shared.d.ts +12 -0
- package/dist-types/components/integrations/youtube-embed.d.ts +95 -0
- package/dist-types/components/shared/policy-actions.d.ts +1 -1
- package/dist-types/components/shared/primitives/button.d.ts +36 -2
- package/dist-types/components/shared/primitives/legal-links/index.d.ts +1 -1
- package/dist-types/components/shared/ui/accordion/accordion.d.ts +2 -2
- package/dist-types/components/shared/ui/branding.d.ts +3 -3
- package/dist-types/components/shared/ui/button/button.d.ts +1 -1
- package/dist-types/components/shared/ui/dialog/dialog.d.ts +1 -1
- package/dist-types/components/shared/ui/logo.d.ts +8 -8
- package/dist-types/headless.d.ts +1 -0
- package/dist-types/hooks/index.d.ts +1 -0
- package/dist-types/hooks/use-consent-script.d.ts +80 -0
- package/dist-types/index.d.ts +3 -1
- package/dist-types/providers/consent-manager-provider.d.ts +1 -1
- package/dist-types/server/headers.d.ts +1 -1
- package/dist-types/utils/theme-utils.d.ts +1 -1
- package/dist-types/version.d.ts +1 -1
- package/docs/README.md +155 -76
- package/docs/{building-headless-components.md → frameworks/react/building-headless-components.md} +3 -1
- package/docs/{callbacks.md → frameworks/react/callbacks.md} +3 -1
- package/docs/{components → frameworks/react/components}/consent-banner.md +10 -21
- package/docs/{components → frameworks/react/components}/consent-dialog-link.md +8 -5
- package/docs/frameworks/react/components/consent-dialog-trigger.md +202 -0
- package/docs/{components → frameworks/react/components}/consent-dialog.md +7 -15
- package/docs/frameworks/react/components/consent-manager-provider.md +228 -0
- package/docs/{components → frameworks/react/components}/consent-widget.md +8 -6
- package/docs/{components → frameworks/react/components}/dev-tools.md +9 -6
- package/docs/{components → frameworks/react/components}/frame.md +8 -9
- package/docs/{concepts → frameworks/react/concepts}/client-modes.md +4 -2
- package/docs/{concepts → frameworks/react/concepts}/consent-categories.md +1 -0
- package/docs/{concepts → frameworks/react/concepts}/consent-models.md +1 -0
- package/docs/{concepts → frameworks/react/concepts}/cookie-management.md +3 -3
- package/docs/{concepts → frameworks/react/concepts}/glossary.md +1 -0
- package/docs/{concepts → frameworks/react/concepts}/initialization-flow.md +1 -0
- package/docs/{concepts → frameworks/react/concepts}/policy-packs.md +1 -0
- package/docs/{headless.md → frameworks/react/headless.md} +3 -1
- package/docs/{hooks → frameworks/react/hooks}/use-color-scheme.md +1 -0
- package/docs/{hooks → frameworks/react/hooks}/use-consent-manager/checking-consent.md +3 -1
- package/docs/{hooks → frameworks/react/hooks}/use-consent-manager/location-info.md +3 -1
- package/docs/frameworks/react/hooks/use-consent-manager/overview.md +172 -0
- package/docs/{hooks → frameworks/react/hooks}/use-consent-manager/setting-consent.md +3 -1
- package/docs/{hooks → frameworks/react/hooks}/use-draggable.md +3 -1
- package/docs/{hooks → frameworks/react/hooks}/use-focus-trap.md +1 -0
- package/docs/{hooks → frameworks/react/hooks}/use-reduced-motion.md +3 -1
- package/docs/{hooks → frameworks/react/hooks}/use-ssr-status.md +6 -5
- package/docs/{hooks → frameworks/react/hooks}/use-text-direction.md +1 -0
- package/docs/frameworks/react/hooks/use-translations.md +55 -0
- package/docs/{iab → frameworks/react/iab}/consent-banner.md +9 -12
- package/docs/{iab → frameworks/react/iab}/consent-dialog.md +9 -14
- package/docs/{iab → frameworks/react/iab}/overview.md +4 -2
- package/docs/{iab → frameworks/react/iab}/use-gvl-data.md +3 -2
- package/docs/{iframe-blocking.md → frameworks/react/iframe-blocking.md} +8 -9
- package/docs/{internationalization.md → frameworks/react/internationalization.md} +13 -3
- package/docs/{network-blocker.md → frameworks/react/network-blocker.md} +13 -51
- package/docs/{optimization.md → frameworks/react/optimization.md} +3 -2
- package/docs/{policy-packs.md → frameworks/react/policy-packs.md} +3 -1
- package/docs/{quickstart.md → frameworks/react/quickstart.md} +26 -42
- package/docs/frameworks/react/script-loader.md +553 -0
- package/docs/{server-side.md → frameworks/react/server-side.md} +9 -4
- package/docs/{styling → frameworks/react/styling}/classnames.md +3 -1
- package/docs/{styling → frameworks/react/styling}/color-scheme.md +3 -1
- package/docs/frameworks/react/styling/css-variables.md +53 -0
- package/docs/frameworks/react/styling/overview.md +302 -0
- package/docs/frameworks/react/styling/slots.md +94 -0
- package/docs/{styling → frameworks/react/styling}/tailwind.md +3 -1
- package/docs/frameworks/react/styling/tokens.md +156 -0
- package/docs/{troubleshooting.md → frameworks/react/troubleshooting.md} +3 -1
- package/docs/integrations/adobe-analytics.md +160 -0
- package/docs/integrations/ahrefs-analytics.md +157 -0
- package/docs/integrations/amplitude.md +230 -0
- package/docs/integrations/building-integrations.md +15 -181
- package/docs/integrations/clearbit.md +130 -0
- package/docs/integrations/cloudflare-web-analytics.md +126 -0
- package/docs/integrations/crisp.md +140 -0
- package/docs/integrations/databuddy.md +152 -150
- package/docs/integrations/fathom-analytics.md +150 -0
- package/docs/integrations/google-maps.md +263 -0
- package/docs/integrations/google-tag-manager.md +102 -101
- package/docs/integrations/google-tag.md +104 -92
- package/docs/integrations/heap.md +219 -0
- package/docs/integrations/hightouch.md +199 -0
- package/docs/integrations/hotjar.md +143 -0
- package/docs/integrations/intercom.md +144 -0
- package/docs/integrations/linkedin-insights.md +142 -90
- package/docs/integrations/logrocket.md +175 -0
- package/docs/integrations/matomo-analytics.md +171 -0
- package/docs/integrations/meta-pixel.md +379 -309
- package/docs/integrations/microsoft-clarity.md +173 -0
- package/docs/integrations/microsoft-uet.md +135 -91
- package/docs/integrations/mixpanel-analytics.md +130 -0
- package/docs/integrations/overview.md +119 -75
- package/docs/integrations/pirsch.md +142 -0
- package/docs/integrations/plausible-analytics.md +154 -0
- package/docs/integrations/posthog.md +186 -127
- package/docs/integrations/promptwatch.md +121 -0
- package/docs/integrations/reddit-pixel.md +241 -0
- package/docs/integrations/rudderstack.md +271 -0
- package/docs/integrations/rybbit-analytics.md +143 -0
- package/docs/integrations/segment.md +146 -0
- package/docs/integrations/snapchat-pixel.md +163 -0
- package/docs/integrations/tiktok-pixel.md +101 -91
- package/docs/integrations/umami-analytics.md +148 -0
- package/docs/integrations/vercel-analytics.md +141 -0
- package/docs/integrations/x-pixel.md +123 -109
- package/docs/integrations/youtube.md +193 -0
- package/docs/shared/concepts/client-modes.md +103 -0
- package/docs/shared/concepts/consent-categories.md +41 -0
- package/docs/shared/concepts/consent-models.md +72 -0
- package/docs/shared/concepts/cookie-management.md +88 -0
- package/docs/shared/concepts/glossary.md +24 -0
- package/docs/shared/concepts/initialization-flow.md +105 -0
- package/docs/shared/concepts/policy-packs.md +225 -0
- package/docs/shared/react/components/consent-banner.md +242 -0
- package/docs/shared/react/components/consent-dialog-link.md +45 -0
- package/docs/shared/react/components/consent-dialog-trigger.md +185 -0
- package/docs/shared/react/components/consent-dialog.md +119 -0
- package/docs/shared/react/components/consent-manager-provider.md +183 -0
- package/docs/shared/react/components/consent-widget.md +121 -0
- package/docs/shared/react/components/dev-tools.md +81 -0
- package/docs/shared/react/components/frame.md +52 -0
- package/docs/shared/react/guides/building-headless-components.md +110 -0
- package/docs/shared/react/guides/callbacks.md +89 -0
- package/docs/shared/react/guides/headless.md +31 -0
- package/docs/shared/react/guides/iframe-blocking.md +65 -0
- package/docs/shared/react/guides/internationalization.md +123 -0
- package/docs/shared/react/guides/network-blocker.md +72 -0
- package/docs/shared/react/guides/optimization.md +44 -0
- package/docs/shared/react/guides/policy-packs.md +173 -0
- package/docs/shared/react/guides/script-loader.md +309 -0
- package/docs/shared/react/hooks/use-color-scheme.md +31 -0
- package/docs/shared/react/hooks/use-consent-manager/checking-consent.md +95 -0
- package/docs/shared/react/hooks/use-consent-manager/location-info.md +96 -0
- package/docs/shared/react/hooks/use-consent-manager/overview.md +74 -0
- package/docs/shared/react/hooks/use-consent-manager/setting-consent.md +93 -0
- package/docs/shared/react/hooks/use-draggable.md +30 -0
- package/docs/shared/react/hooks/use-focus-trap.md +20 -0
- package/docs/shared/react/hooks/use-reduced-motion.md +33 -0
- package/docs/shared/react/hooks/use-ssr-status.md +16 -0
- package/docs/shared/react/hooks/use-text-direction.md +38 -0
- package/docs/shared/react/hooks/use-translations.md +15 -0
- package/docs/shared/react/iab/consent-banner.md +60 -0
- package/docs/shared/react/iab/consent-dialog.md +76 -0
- package/docs/shared/react/iab/overview.md +80 -0
- package/docs/shared/react/iab/use-gvl-data.md +21 -0
- package/docs/shared/react/styling/classnames.md +93 -0
- package/docs/shared/react/styling/color-scheme.md +35 -0
- package/docs/shared/react/styling/css-variables.md +53 -0
- package/docs/shared/react/styling/overview.md +261 -0
- package/docs/shared/react/styling/slots.md +93 -0
- package/docs/shared/react/styling/stylesheet-entrypoint.md +8 -0
- package/docs/shared/react/styling/tailwind.md +88 -0
- package/docs/shared/react/styling/tokens.md +155 -0
- package/docs/shared/troubleshooting.md +82 -0
- package/package.json +23 -12
- package/readme.json +12 -7
- package/docs/ai-agents.md +0 -111
- package/docs/components/consent-dialog-trigger.md +0 -103
- package/docs/components/consent-manager-provider.md +0 -425
- package/docs/hooks/use-consent-manager/overview.md +0 -420
- package/docs/hooks/use-translations.md +0 -118
- package/docs/script-loader.md +0 -321
- package/docs/styling/css-variables.md +0 -92
- package/docs/styling/overview.md +0 -460
- package/docs/styling/slots.md +0 -128
- package/docs/styling/tokens.md +0 -216
|
@@ -1,342 +1,412 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Meta Pixel
|
|
3
|
-
description: Track conversions and build audiences for Facebook and Instagram
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
description: Track conversions and build audiences for Facebook and Instagram
|
|
4
|
+
advertising campaigns.
|
|
6
5
|
icon: meta
|
|
6
|
+
group: integrations
|
|
7
7
|
---
|
|
8
|
-
Meta Pixel (formerly Facebook Pixel) is Meta's conversion tracking and audience targeting tool for Facebook and Instagram advertising. It tracks user actions, measures ad effectiveness, builds custom audiences, and optimizes ad delivery.
|
|
8
|
+
Meta Pixel (formerly Facebook Pixel) is Meta's conversion tracking and audience targeting tool for Facebook and Instagram advertising. It tracks user actions, measures ad effectiveness, builds custom audiences, and optimizes ad delivery.
|
|
9
|
+
|
|
10
|
+
## Integrate with c15t
|
|
11
|
+
|
|
12
|
+
**React**
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { type ReactNode } from 'react';
|
|
16
|
+
import { ConsentManagerProvider } from '@c15t/react';
|
|
17
|
+
import { metaPixel } from '@c15t/scripts/meta-pixel';
|
|
18
|
+
|
|
19
|
+
const scripts = [
|
|
20
|
+
metaPixel({
|
|
21
|
+
pixelId: '123456789012345',
|
|
22
|
+
}),
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
export function ConsentProvider({ children }: { children: ReactNode }) {
|
|
26
|
+
return (
|
|
27
|
+
<ConsentManagerProvider
|
|
28
|
+
options={{
|
|
29
|
+
mode: 'hosted',
|
|
30
|
+
backendURL: 'https://your-instance.c15t.dev',
|
|
31
|
+
scripts,
|
|
32
|
+
}}
|
|
33
|
+
>
|
|
34
|
+
{children}
|
|
35
|
+
</ConsentManagerProvider>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
```
|
|
9
39
|
|
|
10
|
-
|
|
40
|
+
**Next.js**
|
|
11
41
|
|
|
12
|
-
|
|
42
|
+
```tsx
|
|
43
|
+
'use client';
|
|
13
44
|
|
|
14
|
-
|
|
15
|
-
|
|
45
|
+
import { type ReactNode } from 'react';
|
|
46
|
+
import { ConsentManagerProvider } from '@c15t/nextjs';
|
|
47
|
+
import { metaPixel } from '@c15t/scripts/meta-pixel';
|
|
48
|
+
|
|
49
|
+
const scripts = [
|
|
50
|
+
metaPixel({
|
|
51
|
+
pixelId: '123456789012345',
|
|
52
|
+
}),
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
export function ConsentProvider({ children }: { children: ReactNode }) {
|
|
56
|
+
return (
|
|
57
|
+
<ConsentManagerProvider
|
|
58
|
+
options={{
|
|
59
|
+
mode: 'hosted',
|
|
60
|
+
backendURL: '/api/c15t',
|
|
61
|
+
scripts,
|
|
62
|
+
}}
|
|
63
|
+
>
|
|
64
|
+
{children}
|
|
65
|
+
</ConsentManagerProvider>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**JavaScript**
|
|
16
71
|
|
|
17
72
|
```ts
|
|
73
|
+
import { getOrCreateConsentRuntime } from 'c15t';
|
|
18
74
|
import { metaPixel } from '@c15t/scripts/meta-pixel';
|
|
19
75
|
|
|
76
|
+
getOrCreateConsentRuntime({
|
|
77
|
+
mode: 'hosted',
|
|
78
|
+
backendURL: 'https://your-instance.c15t.dev',
|
|
79
|
+
scripts: [
|
|
80
|
+
metaPixel({
|
|
81
|
+
pixelId: '123456789012345',
|
|
82
|
+
}),
|
|
83
|
+
],
|
|
84
|
+
});
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## How c15t loads it
|
|
88
|
+
|
|
89
|
+
* **Category:** `marketing` (Ads & Pixels)
|
|
90
|
+
* **Loads when:** marketing consent is granted
|
|
91
|
+
* **Default install:** c15t queues `fbq('consent', 'grant')`, `fbq('init', pixelId)`, `fbq('track', 'PageView')`, then loads Meta's `fbevents.js`
|
|
92
|
+
* **On revocation:** [persists](/docs/frameworks/react/script-loader#persist-after-revocation) — c15t calls `fbq('consent', 'revoke')` so Meta stops tracking without removing the script
|
|
93
|
+
|
|
94
|
+
Meta recommends installing the base pixel on every page you want to measure. c15t injects scripts into the document head by default, which matches Meta's recommendation to load the pixel early.
|
|
95
|
+
|
|
96
|
+
## Configure the integration
|
|
97
|
+
|
|
98
|
+
Use the default setup when you want Meta's standard `PageView` event to fire as soon as the pixel loads after marketing consent.
|
|
99
|
+
|
|
100
|
+
```ts
|
|
20
101
|
metaPixel({
|
|
21
102
|
pixelId: '123456789012345',
|
|
22
|
-
})
|
|
103
|
+
});
|
|
23
104
|
```
|
|
24
105
|
|
|
25
|
-
|
|
106
|
+
For single-page applications, disable the automatic `PageView` and track route changes yourself.
|
|
26
107
|
|
|
27
|
-
|
|
108
|
+
```ts
|
|
109
|
+
metaPixel({
|
|
110
|
+
pixelId: '123456789012345',
|
|
111
|
+
trackPageView: false,
|
|
112
|
+
});
|
|
113
|
+
```
|
|
28
114
|
|
|
29
|
-
|
|
115
|
+
You can pass optional init data as the third argument to `fbq('init', ...)`.
|
|
30
116
|
|
|
31
117
|
```ts
|
|
118
|
+
metaPixel({
|
|
119
|
+
pixelId: '123456789012345',
|
|
120
|
+
initOptions: {
|
|
121
|
+
external_id: 'customer-123',
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Tracking events in your app
|
|
127
|
+
|
|
128
|
+
c15t gates the Meta Pixel script from loading until `marketing` consent is
|
|
129
|
+
granted. After consent is granted the script stays in the DOM, and c15t calls
|
|
130
|
+
`fbq('consent', 'revoke')` if consent is later revoked so Meta stops tracking
|
|
131
|
+
without removing the script.
|
|
132
|
+
|
|
133
|
+
This means `window.fbq` and the `metaPixelEvent` helpers are only defined after
|
|
134
|
+
the user has granted marketing consent at least once. Before that, unguarded
|
|
135
|
+
calls throw.
|
|
136
|
+
|
|
137
|
+
### Standard events
|
|
138
|
+
|
|
139
|
+
Use `metaPixelEvent` to track Meta standard events. It is a typed wrapper around `fbq('track', ...)`.
|
|
140
|
+
|
|
141
|
+
Meta documents standard event tracking in its [conversion tracking guide](https://developers.facebook.com/docs/meta-pixel/implementation/conversion-tracking) and [Marketing API pixel examples](https://developers.facebook.com/docs/meta-pixel/implementation/marketing-api).
|
|
142
|
+
|
|
143
|
+
```ts
|
|
144
|
+
import { metaPixelEvent } from '@c15t/scripts/meta-pixel';
|
|
145
|
+
|
|
146
|
+
metaPixelEvent('Lead', {
|
|
147
|
+
value: 40,
|
|
148
|
+
currency: 'USD',
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
metaPixelEvent('AddToCart', {
|
|
152
|
+
content_ids: ['SKU-123'],
|
|
153
|
+
content_type: 'product',
|
|
154
|
+
value: 49.99,
|
|
155
|
+
currency: 'USD',
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
metaPixelEvent(
|
|
159
|
+
'Purchase',
|
|
160
|
+
{
|
|
161
|
+
contents: [
|
|
162
|
+
{ id: 'SKU-123', quantity: 2 },
|
|
163
|
+
{ id: 'SKU-456', quantity: 1 },
|
|
164
|
+
],
|
|
165
|
+
content_type: 'product',
|
|
166
|
+
value: 149.97,
|
|
167
|
+
currency: 'USD',
|
|
168
|
+
},
|
|
169
|
+
'browser-event-123'
|
|
170
|
+
);
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
The optional third argument can be an event ID string or an options object. c15t forwards string IDs as `{ eventID: '...' }`, which is the browser-side format used for Conversions API deduplication.
|
|
174
|
+
|
|
175
|
+
```ts
|
|
176
|
+
metaPixelEvent(
|
|
177
|
+
'Purchase',
|
|
178
|
+
{ value: 149.97, currency: 'USD' },
|
|
179
|
+
{ eventID: 'browser-event-123' }
|
|
180
|
+
);
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Custom events
|
|
184
|
+
|
|
185
|
+
Use `metaPixelCustomEvent` when Meta's standard events do not fit the action you are measuring. Meta custom event names must be strings and cannot exceed 50 characters.
|
|
186
|
+
|
|
187
|
+
```ts
|
|
188
|
+
import { metaPixelCustomEvent } from '@c15t/scripts/meta-pixel';
|
|
189
|
+
|
|
190
|
+
metaPixelCustomEvent('ShareDiscount', {
|
|
191
|
+
promotion: 'share_discount_10%',
|
|
192
|
+
});
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Custom events can also use an event ID for Conversions API deduplication.
|
|
196
|
+
|
|
197
|
+
```ts
|
|
198
|
+
metaPixelCustomEvent(
|
|
199
|
+
'ShareDiscount',
|
|
200
|
+
{ promotion: 'share_discount_10%' },
|
|
201
|
+
'browser-event-456'
|
|
202
|
+
);
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Guard event calls with consent
|
|
206
|
+
|
|
207
|
+
The example below intentionally uses `useConsentManager().has('marketing')` as
|
|
208
|
+
a defensive policy so your app avoids calling `metaPixelEvent` whenever consent
|
|
209
|
+
is currently revoked, even though Meta also suppresses tracking after initial
|
|
210
|
+
load.
|
|
211
|
+
|
|
212
|
+
```tsx
|
|
213
|
+
import { useConsentManager } from '@c15t/react';
|
|
214
|
+
import { metaPixelEvent } from '@c15t/scripts/meta-pixel';
|
|
215
|
+
|
|
216
|
+
function useTrackPurchase() {
|
|
217
|
+
const { has } = useConsentManager();
|
|
218
|
+
|
|
219
|
+
// Defensive pattern: only call metaPixelEvent while marketing consent is granted.
|
|
220
|
+
return () => {
|
|
221
|
+
if (has('marketing')) {
|
|
222
|
+
metaPixelEvent('Purchase', { value: 10.0, currency: 'USD' });
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function PurchaseButton() {
|
|
228
|
+
const trackPurchase = useTrackPurchase();
|
|
229
|
+
|
|
230
|
+
return <button onClick={trackPurchase}>Complete purchase</button>;
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### SPA route changes
|
|
235
|
+
|
|
236
|
+
Meta's [SPA guidance](https://developers.facebook.com/docs/facebook-pixel/implementation/tag_spa) recommends tracking meaningful URL changes from your router. Disable the install-time `PageView`, then emit page views after navigation while marketing consent is granted.
|
|
237
|
+
|
|
238
|
+
```tsx
|
|
239
|
+
import { useConsentManager } from '@c15t/react';
|
|
32
240
|
import { metaPixelEvent } from '@c15t/scripts/meta-pixel';
|
|
241
|
+
import { useEffect } from 'react';
|
|
242
|
+
import { useLocation } from 'react-router-dom';
|
|
243
|
+
|
|
244
|
+
function MetaRouteTracking() {
|
|
245
|
+
const { has } = useConsentManager();
|
|
246
|
+
const location = useLocation();
|
|
247
|
+
|
|
248
|
+
useEffect(() => {
|
|
249
|
+
if (has('marketing')) {
|
|
250
|
+
metaPixelEvent('PageView');
|
|
251
|
+
}
|
|
252
|
+
}, [has, location.pathname, location.search]);
|
|
253
|
+
|
|
254
|
+
return null;
|
|
255
|
+
}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## Consent and privacy
|
|
259
|
+
|
|
260
|
+
Meta's GDPR guidance documents `fbq('consent', 'revoke')` and `fbq('consent', 'grant')`. c15t handles those calls for you after the script has loaded once:
|
|
261
|
+
|
|
262
|
+
* Before marketing consent, c15t does not load Meta Pixel.
|
|
263
|
+
* When marketing consent is granted, c15t loads Meta Pixel and calls `fbq('consent', 'grant')`.
|
|
264
|
+
* When marketing consent is revoked later, c15t keeps the script in place and calls `fbq('consent', 'revoke')`.
|
|
265
|
+
|
|
266
|
+
For US state privacy rules, Meta supports [Data Processing Options](https://developers.facebook.com/docs/meta-pixel/implementation/data-processing-options). Pass `dataProcessingOptions` to queue `fbq('dataProcessingOptions', ...)` before `fbq('init', ...)`.
|
|
267
|
+
|
|
268
|
+
Let Meta geolocate Limited Data Use:
|
|
269
|
+
|
|
270
|
+
```ts
|
|
271
|
+
metaPixel({
|
|
272
|
+
pixelId: '123456789012345',
|
|
273
|
+
dataProcessingOptions: {
|
|
274
|
+
options: ['LDU'],
|
|
275
|
+
country: 0,
|
|
276
|
+
state: 0,
|
|
277
|
+
},
|
|
278
|
+
});
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Enable Limited Data Use for California:
|
|
33
282
|
|
|
34
|
-
|
|
283
|
+
```ts
|
|
284
|
+
metaPixel({
|
|
285
|
+
pixelId: '123456789012345',
|
|
286
|
+
dataProcessingOptions: {
|
|
287
|
+
options: ['LDU'],
|
|
288
|
+
country: 1,
|
|
289
|
+
state: 1000,
|
|
290
|
+
},
|
|
291
|
+
});
|
|
35
292
|
```
|
|
36
293
|
|
|
294
|
+
Explicitly disable Limited Data Use:
|
|
295
|
+
|
|
296
|
+
```ts
|
|
297
|
+
metaPixel({
|
|
298
|
+
pixelId: '123456789012345',
|
|
299
|
+
dataProcessingOptions: {
|
|
300
|
+
options: [],
|
|
301
|
+
},
|
|
302
|
+
});
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
## Catalog and collaborative ads
|
|
306
|
+
|
|
307
|
+
For Advantage+ catalog ads, Meta requires `ViewContent`, `AddToCart`, and `Purchase` events to include either `content_ids` or `contents`. IDs must match your product catalog. See Meta's [Advantage+ catalog ads guide](https://developers.facebook.com/docs/meta-pixel/get-started/advantage-catalog-ads).
|
|
308
|
+
|
|
309
|
+
```ts
|
|
310
|
+
metaPixelEvent('ViewContent', {
|
|
311
|
+
content_ids: ['SKU-123'],
|
|
312
|
+
content_type: 'product',
|
|
313
|
+
value: 49.99,
|
|
314
|
+
currency: 'USD',
|
|
315
|
+
});
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
For collaborative ads, Meta requires `content_type: 'product'`; `AddToCart` and `Purchase` also require `contents`, `currency`, and `value`. See Meta's [collaborative ads pixel guide](https://developers.facebook.com/docs/meta-pixel/implementation/pixel-for-collaborative-ads).
|
|
319
|
+
|
|
320
|
+
```ts
|
|
321
|
+
metaPixelEvent('AddToCart', {
|
|
322
|
+
contents: [{ id: 'SKU-123', quantity: 2 }],
|
|
323
|
+
content_type: 'product',
|
|
324
|
+
value: 99.98,
|
|
325
|
+
currency: 'USD',
|
|
326
|
+
});
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
## Movies
|
|
330
|
+
|
|
331
|
+
Meta's [movies pixel guide](https://developers.facebook.com/docs/meta-pixel/implementation/pixel-for-movies) uses the standard events `ViewContent`, `InitiateCheckout`, `Purchase`, and `PageView` with movie-specific parameters such as `movieref`.
|
|
332
|
+
|
|
333
|
+
```ts
|
|
334
|
+
metaPixelEvent('InitiateCheckout', {
|
|
335
|
+
content_ids: ['movie-1|theater-1|2026-05-11T19:30:00-07:00'],
|
|
336
|
+
movieref: 'fb_movies',
|
|
337
|
+
num_items: 2,
|
|
338
|
+
});
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
## Multiple pixels
|
|
342
|
+
|
|
343
|
+
Meta's [multiple pixel guidance](https://developers.facebook.com/docs/facebook-pixel/implementation/accurate_event_tracking) warns that `fbq('track', ...)` and `fbq('trackCustom', ...)` fire for every initialized pixel ID. If another integration or tag manager initializes more than one pixel, use the single-pixel helpers to prevent overfiring.
|
|
344
|
+
|
|
345
|
+
```ts
|
|
346
|
+
import {
|
|
347
|
+
metaPixelSingleCustomEvent,
|
|
348
|
+
metaPixelSingleEvent,
|
|
349
|
+
} from '@c15t/scripts/meta-pixel';
|
|
350
|
+
|
|
351
|
+
metaPixelSingleEvent('PIXEL-A', 'Purchase', {
|
|
352
|
+
value: 149.97,
|
|
353
|
+
currency: 'USD',
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
metaPixelSingleCustomEvent('PIXEL-B', 'Step4', {
|
|
357
|
+
funnel: 'checkout',
|
|
358
|
+
});
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
## Custom audiences and sharing
|
|
362
|
+
|
|
363
|
+
Meta custom audiences are configured in Events Manager after standard events, custom events, or custom conversions are being received. The c15t integration sends the browser events; audience rules are managed in Meta. See Meta's [custom audiences guide](https://developers.facebook.com/docs/facebook-pixel/implementation/custom-audiences).
|
|
364
|
+
|
|
365
|
+
Pixel sharing between businesses or agencies is also managed through Meta Business Manager or the Business Management APIs, not through the browser script. See Meta's [pixel sharing guide](https://developers.facebook.com/docs/marketing-api/business-asset-management/guides/business-pixel-sharing).
|
|
366
|
+
|
|
37
367
|
## Types
|
|
38
368
|
|
|
39
369
|
### MetaPixelOptions
|
|
40
370
|
|
|
41
|
-
|Property|
|
|
42
|
-
|
|
43
|
-
|
|
|
44
|
-
|
|
|
371
|
+
|Property|Value|
|
|
372
|
+
|:--|:--|
|
|
373
|
+
|Type Name|\`MetaPixelOptions\`|
|
|
374
|
+
|Source Path|\`./packages/scripts/src/vendors/ads-and-pixels/meta-pixel.ts\`|
|
|
375
|
+
|
|
376
|
+
\*ExtractedTypeTable: Could not extract "MetaPixelOptions" from "./packages/scripts/src/vendors/ads-and-pixels/meta-pixel.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
|
|
377
|
+
|
|
378
|
+
### MetaPixelDataProcessingOptions
|
|
379
|
+
|
|
380
|
+
|Property|Value|
|
|
381
|
+
|:--|:--|
|
|
382
|
+
|Type Name|\`MetaPixelDataProcessingOptions\`|
|
|
383
|
+
|Source Path|\`./packages/scripts/src/vendors/ads-and-pixels/meta-pixel.ts\`|
|
|
384
|
+
|
|
385
|
+
\*ExtractedTypeTable: Could not extract "MetaPixelDataProcessingOptions" from "./packages/scripts/src/vendors/ads-and-pixels/meta-pixel.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
|
|
386
|
+
|
|
387
|
+
### MetaPixelEventOptions
|
|
388
|
+
|
|
389
|
+
|Property|Value|
|
|
390
|
+
|:--|:--|
|
|
391
|
+
|Type Name|\`MetaPixelEventOptions\`|
|
|
392
|
+
|Source Path|\`./packages/scripts/src/vendors/ads-and-pixels/meta-pixel.ts\`|
|
|
393
|
+
|
|
394
|
+
\*ExtractedTypeTable: Could not extract "MetaPixelEventOptions" from "./packages/scripts/src/vendors/ads-and-pixels/meta-pixel.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
|
|
45
395
|
|
|
46
396
|
### Script
|
|
47
397
|
|
|
48
|
-
|Property|
|
|
49
|
-
|
|
50
|
-
|
|
|
51
|
-
|src
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|callbackOnly|boolean \|undefined|Whether this is a callback-only script that doesn't need to load an external resource. When true, no script tag will be added to the DOM, only callbacks will be executed.|false|Optional|
|
|
55
|
-
|persistAfterConsentRevoked|boolean \|undefined|Whether the script should persist after consent is revoked.|false|Optional|
|
|
56
|
-
|alwaysLoad|boolean \|undefined|Whether the script should always load regardless of consent state. This is useful for scripts like Google Tag Manager or PostHog that manage their own consent state internally. The script will load immediately and never be unloaded based on consent changes. Note: When using this option, you are responsible for ensuring the script itself respects user consent preferences through its own consent management.|false|Optional|
|
|
57
|
-
|fetchPriority|"high" \|"low" \|"auto" \|undefined|Priority hint for browser resource loading|-|Optional|
|
|
58
|
-
|attributes|Record\<string, string> \|undefined|Additional attributes to add to the script element|-|Optional|
|
|
59
|
-
|async|boolean \|undefined|Whether to use async loading|-|Optional|
|
|
60
|
-
|defer|boolean \|undefined|Whether to defer script loading|-|Optional|
|
|
61
|
-
|nonce|string \|undefined|Content Security Policy nonce|-|Optional|
|
|
62
|
-
|anonymizeId|boolean \|undefined|Whether to use an anonymized ID for the script element, this helps ensure the script is not blocked by ad blockers|true|Optional|
|
|
63
|
-
|target|"head" \|"body" \|undefined|Where to inject the script element in the DOM. Options: \`'head'\`: Scripts are appended to \`\<head>\` (default); \`'body'\`: Scripts are appended to \`\<body>\`|'head'|Optional|
|
|
64
|
-
|onBeforeLoad|Object \|undefined|Callback executed before the script is loaded|-|Optional|
|
|
65
|
-
|onLoad|Object \|undefined|Callback executed when the script loads successfully|-|Optional|
|
|
66
|
-
|onError|Object \|undefined|Callback executed if the script fails to load|-|Optional|
|
|
67
|
-
|onConsentChange|Object \|undefined|Callback executed whenever the consent store is changed. This callback only applies to scripts already loaded.|-|Optional|
|
|
68
|
-
|vendorId|string \|number \|undefined|IAB TCF vendor ID - links script to a registered vendor. When in IAB mode, the script will only load if this vendor has consent. Takes precedence over \`category\` when in IAB mode. Use custom vendor IDs (string or number) to gate non-IAB vendors too.|-|Optional|
|
|
69
|
-
|iabPurposes|number\[] \|undefined|IAB TCF purpose IDs this script requires consent for. When in IAB mode and no vendorId is set, the script will only load if ALL specified purposes have consent.|-|Optional|
|
|
70
|
-
|iabLegIntPurposes|number\[] \|undefined|IAB TCF legitimate interest purpose IDs. These purposes can operate under legitimate interest instead of consent. The script loads if all iabPurposes have consent OR all iabLegIntPurposes have legitimate interest established.|-|Optional|
|
|
71
|
-
|iabSpecialFeatures|number\[] \|undefined|IAB TCF special feature IDs this script requires. Options: 1: Use precise geolocation data; 2: Actively scan device characteristics for identification|-|Optional|
|
|
72
|
-
|
|
73
|
-
#### `onBeforeLoad`
|
|
74
|
-
|
|
75
|
-
Callback executed before the script is loaded
|
|
76
|
-
|
|
77
|
-
|Property|Type|Description|Default|Required|
|
|
78
|
-
|:--|:--|:--|:--|:--:|
|
|
79
|
-
|id|string|The original script ID|-|✅ Required|
|
|
80
|
-
|elementId|string|The actual DOM element ID used (anonymized if enabled)|-|✅ Required|
|
|
81
|
-
|hasConsent|boolean|Has consent|-|✅ Required|
|
|
82
|
-
|consents|ConsentState|The current consent state|-|✅ Required|
|
|
83
|
-
|element|HTMLScriptElement \|undefined|The script element (for load/error callbacks) Will be undefined for callback-only scripts|-|Optional|
|
|
84
|
-
|error|Error \|undefined|Error information (for error callbacks)|-|Optional|
|
|
85
|
-
|
|
86
|
-
#### `onLoad`
|
|
87
|
-
|
|
88
|
-
Callback executed when the script loads successfully
|
|
89
|
-
|
|
90
|
-
|Property|Type|Description|Default|Required|
|
|
91
|
-
|:--|:--|:--|:--|:--:|
|
|
92
|
-
|id|string|The original script ID|-|✅ Required|
|
|
93
|
-
|elementId|string|The actual DOM element ID used (anonymized if enabled)|-|✅ Required|
|
|
94
|
-
|hasConsent|boolean|Has consent|-|✅ Required|
|
|
95
|
-
|consents|ConsentState|The current consent state|-|✅ Required|
|
|
96
|
-
|element|HTMLScriptElement \|undefined|The script element (for load/error callbacks) Will be undefined for callback-only scripts|-|Optional|
|
|
97
|
-
|error|Error \|undefined|Error information (for error callbacks)|-|Optional|
|
|
98
|
-
|
|
99
|
-
#### `onError`
|
|
100
|
-
|
|
101
|
-
Callback executed if the script fails to load
|
|
102
|
-
|
|
103
|
-
|Property|Type|Description|Default|Required|
|
|
104
|
-
|:--|:--|:--|:--|:--:|
|
|
105
|
-
|id|string|The original script ID|-|✅ Required|
|
|
106
|
-
|elementId|string|The actual DOM element ID used (anonymized if enabled)|-|✅ Required|
|
|
107
|
-
|hasConsent|boolean|Has consent|-|✅ Required|
|
|
108
|
-
|consents|ConsentState|The current consent state|-|✅ Required|
|
|
109
|
-
|element|HTMLScriptElement \|undefined|The script element (for load/error callbacks) Will be undefined for callback-only scripts|-|Optional|
|
|
110
|
-
|error|Error \|undefined|Error information (for error callbacks)|-|Optional|
|
|
111
|
-
|
|
112
|
-
#### `onConsentChange`
|
|
113
|
-
|
|
114
|
-
Callback executed whenever the consent store is changed. This callback only applies to scripts already loaded.
|
|
115
|
-
|
|
116
|
-
|Property|Type|Description|Default|Required|
|
|
117
|
-
|:--|:--|:--|:--|:--:|
|
|
118
|
-
|id|string|The original script ID|-|✅ Required|
|
|
119
|
-
|elementId|string|The actual DOM element ID used (anonymized if enabled)|-|✅ Required|
|
|
120
|
-
|hasConsent|boolean|Has consent|-|✅ Required|
|
|
121
|
-
|consents|ConsentState|The current consent state|-|✅ Required|
|
|
122
|
-
|element|HTMLScriptElement \|undefined|The script element (for load/error callbacks) Will be undefined for callback-only scripts|-|Optional|
|
|
123
|
-
|error|Error \|undefined|Error information (for error callbacks)|-|Optional|
|
|
398
|
+
|Property|Value|
|
|
399
|
+
|:--|:--|
|
|
400
|
+
|Type Name|\`Script\`|
|
|
401
|
+
|Source Path|\`./packages/core/src/libs/script-loader/types.ts\`|
|
|
402
|
+
|
|
403
|
+
\*ExtractedTypeTable: Could not extract "Script" from "./packages/core/src/libs/script-loader/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
|
|
124
404
|
|
|
125
405
|
### StandardEventParams
|
|
126
406
|
|
|
127
|
-
|Property|
|
|
128
|
-
|
|
129
|
-
|
|
|
130
|
-
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|Contact|FbqBaseEventParams|-|-|✅ Required|
|
|
134
|
-
|CustomizeProduct|FbqBaseEventParams|-|-|✅ Required|
|
|
135
|
-
|Donate|FbqBaseEventParams|-|-|✅ Required|
|
|
136
|
-
|FindLocation|FbqBaseEventParams|-|-|✅ Required|
|
|
137
|
-
|InitiateCheckout|InitiateCheckoutParams|-|-|✅ Required|
|
|
138
|
-
|Lead|LeadParams|-|-|✅ Required|
|
|
139
|
-
|Purchase|PurchaseParams|-|-|✅ Required|
|
|
140
|
-
|Schedule|FbqBaseEventParams|-|-|✅ Required|
|
|
141
|
-
|Search|SearchParams|-|-|✅ Required|
|
|
142
|
-
|StartTrial|StartTrialParams|-|-|✅ Required|
|
|
143
|
-
|SubmitApplication|FbqBaseEventParams|-|-|✅ Required|
|
|
144
|
-
|Subscribe|SubscribeParams|-|-|✅ Required|
|
|
145
|
-
|ViewContent|ViewContentParams|-|-|✅ Required|
|
|
146
|
-
|
|
147
|
-
#### `AddPaymentInfo` AddPaymentInfoParams
|
|
148
|
-
|
|
149
|
-
|Property|Type|Description|Default|Required|
|
|
150
|
-
|:--|:--|:--|:--|:--:|
|
|
151
|
-
|content\_ids|(string \|number)\[] \|undefined|-|-|Optional|
|
|
152
|
-
|contents|FbqContent \|undefined|-|-|Optional|
|
|
153
|
-
|currency|string \|undefined|-|-|Optional|
|
|
154
|
-
|value|number \|undefined|-|-|Optional|
|
|
155
|
-
|
|
156
|
-
#### `AddToCart` AddToCartParams
|
|
157
|
-
|
|
158
|
-
|Property|Type|Description|Default|Required|
|
|
159
|
-
|:--|:--|:--|:--|:--:|
|
|
160
|
-
|content\_ids|(string \|number)\[] \|undefined|-|-|Optional|
|
|
161
|
-
|contents|FbqContent \|undefined|-|-|Optional|
|
|
162
|
-
|currency|string \|undefined|-|-|Optional|
|
|
163
|
-
|value|number \|undefined|-|-|Optional|
|
|
164
|
-
|content\_type|"product" \|"product\_group" \|undefined|-|-|Optional|
|
|
165
|
-
|
|
166
|
-
#### `AddToWishlist` AddToWishlistParams
|
|
167
|
-
|
|
168
|
-
|Property|Type|Description|Default|Required|
|
|
169
|
-
|:--|:--|:--|:--|:--:|
|
|
170
|
-
|content\_ids|(string \|number)\[] \|undefined|-|-|Optional|
|
|
171
|
-
|contents|FbqContent \|undefined|-|-|Optional|
|
|
172
|
-
|currency|string \|undefined|-|-|Optional|
|
|
173
|
-
|value|number \|undefined|-|-|Optional|
|
|
174
|
-
|
|
175
|
-
#### `CompleteRegistration` CompleteRegistrationParams
|
|
176
|
-
|
|
177
|
-
|Property|Type|Description|Default|Required|
|
|
178
|
-
|:--|:--|:--|:--|:--:|
|
|
179
|
-
|currency|string \|undefined|-|-|Optional|
|
|
180
|
-
|value|number \|undefined|-|-|Optional|
|
|
181
|
-
|status|boolean \|undefined|-|-|Optional|
|
|
182
|
-
|
|
183
|
-
#### `Contact` FbqBaseEventParams
|
|
184
|
-
|
|
185
|
-
|Property|Type|Description|Default|Required|
|
|
186
|
-
|:--|:--|:--|:--|:--:|
|
|
187
|
-
|content\_category|string \|undefined|-|-|Optional|
|
|
188
|
-
|content\_ids|(string \|number)\[] \|undefined|-|-|Optional|
|
|
189
|
-
|content\_name|string \|undefined|-|-|Optional|
|
|
190
|
-
|content\_type|"product" \|"product\_group" \|undefined|-|-|Optional|
|
|
191
|
-
|contents|FbqContent \|undefined|-|-|Optional|
|
|
192
|
-
|currency|string \|undefined|-|-|Optional|
|
|
193
|
-
|num\_items|number \|undefined|-|-|Optional|
|
|
194
|
-
|predicted\_ltv|number \|undefined|-|-|Optional|
|
|
195
|
-
|search\_string|string \|undefined|-|-|Optional|
|
|
196
|
-
|status|boolean \|undefined|-|-|Optional|
|
|
197
|
-
|value|number \|undefined|-|-|Optional|
|
|
198
|
-
|
|
199
|
-
#### `CustomizeProduct` FbqBaseEventParams
|
|
200
|
-
|
|
201
|
-
|Property|Type|Description|Default|Required|
|
|
202
|
-
|:--|:--|:--|:--|:--:|
|
|
203
|
-
|content\_category|string \|undefined|-|-|Optional|
|
|
204
|
-
|content\_ids|(string \|number)\[] \|undefined|-|-|Optional|
|
|
205
|
-
|content\_name|string \|undefined|-|-|Optional|
|
|
206
|
-
|content\_type|"product" \|"product\_group" \|undefined|-|-|Optional|
|
|
207
|
-
|contents|FbqContent \|undefined|-|-|Optional|
|
|
208
|
-
|currency|string \|undefined|-|-|Optional|
|
|
209
|
-
|num\_items|number \|undefined|-|-|Optional|
|
|
210
|
-
|predicted\_ltv|number \|undefined|-|-|Optional|
|
|
211
|
-
|search\_string|string \|undefined|-|-|Optional|
|
|
212
|
-
|status|boolean \|undefined|-|-|Optional|
|
|
213
|
-
|value|number \|undefined|-|-|Optional|
|
|
214
|
-
|
|
215
|
-
#### `Donate` FbqBaseEventParams
|
|
216
|
-
|
|
217
|
-
|Property|Type|Description|Default|Required|
|
|
218
|
-
|:--|:--|:--|:--|:--:|
|
|
219
|
-
|content\_category|string \|undefined|-|-|Optional|
|
|
220
|
-
|content\_ids|(string \|number)\[] \|undefined|-|-|Optional|
|
|
221
|
-
|content\_name|string \|undefined|-|-|Optional|
|
|
222
|
-
|content\_type|"product" \|"product\_group" \|undefined|-|-|Optional|
|
|
223
|
-
|contents|FbqContent \|undefined|-|-|Optional|
|
|
224
|
-
|currency|string \|undefined|-|-|Optional|
|
|
225
|
-
|num\_items|number \|undefined|-|-|Optional|
|
|
226
|
-
|predicted\_ltv|number \|undefined|-|-|Optional|
|
|
227
|
-
|search\_string|string \|undefined|-|-|Optional|
|
|
228
|
-
|status|boolean \|undefined|-|-|Optional|
|
|
229
|
-
|value|number \|undefined|-|-|Optional|
|
|
230
|
-
|
|
231
|
-
#### `FindLocation` FbqBaseEventParams
|
|
232
|
-
|
|
233
|
-
|Property|Type|Description|Default|Required|
|
|
234
|
-
|:--|:--|:--|:--|:--:|
|
|
235
|
-
|content\_category|string \|undefined|-|-|Optional|
|
|
236
|
-
|content\_ids|(string \|number)\[] \|undefined|-|-|Optional|
|
|
237
|
-
|content\_name|string \|undefined|-|-|Optional|
|
|
238
|
-
|content\_type|"product" \|"product\_group" \|undefined|-|-|Optional|
|
|
239
|
-
|contents|FbqContent \|undefined|-|-|Optional|
|
|
240
|
-
|currency|string \|undefined|-|-|Optional|
|
|
241
|
-
|num\_items|number \|undefined|-|-|Optional|
|
|
242
|
-
|predicted\_ltv|number \|undefined|-|-|Optional|
|
|
243
|
-
|search\_string|string \|undefined|-|-|Optional|
|
|
244
|
-
|status|boolean \|undefined|-|-|Optional|
|
|
245
|
-
|value|number \|undefined|-|-|Optional|
|
|
246
|
-
|
|
247
|
-
#### `InitiateCheckout` InitiateCheckoutParams
|
|
248
|
-
|
|
249
|
-
|Property|Type|Description|Default|Required|
|
|
250
|
-
|:--|:--|:--|:--|:--:|
|
|
251
|
-
|content\_ids|(string \|number)\[] \|undefined|-|-|Optional|
|
|
252
|
-
|contents|FbqContent \|undefined|-|-|Optional|
|
|
253
|
-
|currency|string \|undefined|-|-|Optional|
|
|
254
|
-
|value|number \|undefined|-|-|Optional|
|
|
255
|
-
|num\_items|number \|undefined|-|-|Optional|
|
|
256
|
-
|
|
257
|
-
#### `Lead` LeadParams
|
|
258
|
-
|
|
259
|
-
|Property|Type|Description|Default|Required|
|
|
260
|
-
|:--|:--|:--|:--|:--:|
|
|
261
|
-
|currency|string \|undefined|-|-|Optional|
|
|
262
|
-
|value|number \|undefined|-|-|Optional|
|
|
263
|
-
|
|
264
|
-
#### `Purchase` PurchaseParams
|
|
265
|
-
|
|
266
|
-
|Property|Type|Description|Default|Required|
|
|
267
|
-
|:--|:--|:--|:--|:--:|
|
|
268
|
-
|content\_ids|(string \|number)\[] \|undefined|-|-|Optional|
|
|
269
|
-
|contents|FbqContent \|undefined|-|-|Optional|
|
|
270
|
-
|content\_type|"product" \|"product\_group" \|undefined|-|-|Optional|
|
|
271
|
-
|num\_items|number \|undefined|-|-|Optional|
|
|
272
|
-
|currency|string|-|-|Optional|
|
|
273
|
-
|value|number|-|-|Optional|
|
|
274
|
-
|
|
275
|
-
#### `Schedule` FbqBaseEventParams
|
|
276
|
-
|
|
277
|
-
|Property|Type|Description|Default|Required|
|
|
278
|
-
|:--|:--|:--|:--|:--:|
|
|
279
|
-
|content\_category|string \|undefined|-|-|Optional|
|
|
280
|
-
|content\_ids|(string \|number)\[] \|undefined|-|-|Optional|
|
|
281
|
-
|content\_name|string \|undefined|-|-|Optional|
|
|
282
|
-
|content\_type|"product" \|"product\_group" \|undefined|-|-|Optional|
|
|
283
|
-
|contents|FbqContent \|undefined|-|-|Optional|
|
|
284
|
-
|currency|string \|undefined|-|-|Optional|
|
|
285
|
-
|num\_items|number \|undefined|-|-|Optional|
|
|
286
|
-
|predicted\_ltv|number \|undefined|-|-|Optional|
|
|
287
|
-
|search\_string|string \|undefined|-|-|Optional|
|
|
288
|
-
|status|boolean \|undefined|-|-|Optional|
|
|
289
|
-
|value|number \|undefined|-|-|Optional|
|
|
290
|
-
|
|
291
|
-
#### `Search` SearchParams
|
|
292
|
-
|
|
293
|
-
|Property|Type|Description|Default|Required|
|
|
294
|
-
|:--|:--|:--|:--|:--:|
|
|
295
|
-
|content\_ids|(string \|number)\[] \|undefined|-|-|Optional|
|
|
296
|
-
|contents|FbqContent \|undefined|-|-|Optional|
|
|
297
|
-
|currency|string \|undefined|-|-|Optional|
|
|
298
|
-
|value|number \|undefined|-|-|Optional|
|
|
299
|
-
|content\_type|"product" \|"product\_group" \|undefined|-|-|Optional|
|
|
300
|
-
|search\_string|string \|undefined|-|-|Optional|
|
|
301
|
-
|
|
302
|
-
#### `StartTrial` StartTrialParams
|
|
303
|
-
|
|
304
|
-
|Property|Type|Description|Default|Required|
|
|
305
|
-
|:--|:--|:--|:--|:--:|
|
|
306
|
-
|currency|string \|undefined|-|-|Optional|
|
|
307
|
-
|value|number \|undefined|-|-|Optional|
|
|
308
|
-
|predicted\_ltv|number \|undefined|-|-|Optional|
|
|
309
|
-
|
|
310
|
-
#### `SubmitApplication` FbqBaseEventParams
|
|
311
|
-
|
|
312
|
-
|Property|Type|Description|Default|Required|
|
|
313
|
-
|:--|:--|:--|:--|:--:|
|
|
314
|
-
|content\_category|string \|undefined|-|-|Optional|
|
|
315
|
-
|content\_ids|(string \|number)\[] \|undefined|-|-|Optional|
|
|
316
|
-
|content\_name|string \|undefined|-|-|Optional|
|
|
317
|
-
|content\_type|"product" \|"product\_group" \|undefined|-|-|Optional|
|
|
318
|
-
|contents|FbqContent \|undefined|-|-|Optional|
|
|
319
|
-
|currency|string \|undefined|-|-|Optional|
|
|
320
|
-
|num\_items|number \|undefined|-|-|Optional|
|
|
321
|
-
|predicted\_ltv|number \|undefined|-|-|Optional|
|
|
322
|
-
|search\_string|string \|undefined|-|-|Optional|
|
|
323
|
-
|status|boolean \|undefined|-|-|Optional|
|
|
324
|
-
|value|number \|undefined|-|-|Optional|
|
|
325
|
-
|
|
326
|
-
#### `Subscribe` SubscribeParams
|
|
327
|
-
|
|
328
|
-
|Property|Type|Description|Default|Required|
|
|
329
|
-
|:--|:--|:--|:--|:--:|
|
|
330
|
-
|currency|string \|undefined|-|-|Optional|
|
|
331
|
-
|value|number \|undefined|-|-|Optional|
|
|
332
|
-
|predicted\_ltv|number \|undefined|-|-|Optional|
|
|
333
|
-
|
|
334
|
-
#### `ViewContent` ViewContentParams
|
|
335
|
-
|
|
336
|
-
|Property|Type|Description|Default|Required|
|
|
337
|
-
|:--|:--|:--|:--|:--:|
|
|
338
|
-
|content\_ids|(string \|number)\[] \|undefined|-|-|Optional|
|
|
339
|
-
|contents|FbqContent \|undefined|-|-|Optional|
|
|
340
|
-
|currency|string \|undefined|-|-|Optional|
|
|
341
|
-
|value|number \|undefined|-|-|Optional|
|
|
342
|
-
|content\_type|"product" \|"product\_group" \|undefined|-|-|Optional|
|
|
407
|
+
|Property|Value|
|
|
408
|
+
|:--|:--|
|
|
409
|
+
|Type Name|\`StandardEventParams\`|
|
|
410
|
+
|Source Path|\`./packages/scripts/src/vendors/ads-and-pixels/meta-pixel.ts\`|
|
|
411
|
+
|
|
412
|
+
\*ExtractedTypeTable: Could not extract "StandardEventParams" from "./packages/scripts/src/vendors/ads-and-pixels/meta-pixel.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
|