@c15t/react 3.1.0 → 3.2.0
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 +35 -5
- package/README.md +2 -2
- package/dist/component-hooks/use-consent-gate.js +2 -0
- package/dist/component-hooks/use-consent-labels.js +2 -0
- package/dist/component-hooks/use-consent-text-direction.js +2 -0
- package/dist/component-hooks/use-vendors-listed-under.js +2 -0
- package/dist/components/consent-gate/atoms.js +1 -1
- package/dist/components/consent-gate/consent-gate.js +1 -1
- package/dist/components/iab-prompt/atoms/root.js +1 -1
- package/dist/components/panel-trigger/atoms/toolbar.js +1 -1
- package/dist/components/preferences/atoms/button.js +1 -1
- package/dist/components/preferences/atoms/vendor-list.js +1 -1
- package/dist/components/prompt/atoms/root.js +1 -1
- package/dist/components/prompt/components.js +1 -1
- package/dist/components/prompt/policy-actions.js +1 -1
- package/dist/components/prompt/prompt.js +1 -1
- package/dist/components/prompt/surface-context.js +1 -1
- package/dist/components/prompt/use-banner-copy.js +1 -1
- package/dist/components/shared/streamed-surface.js +1 -1
- package/dist/headless.js +1 -1
- package/dist/index-parts/offline.js +1 -1
- package/dist/modes.js +1 -1
- package/dist/styles.tw3.css +2 -2
- package/dist/transports/offline.js +1 -1
- package/dist/version.js +1 -1
- package/dist-types/component-hooks/use-consent-gate.d.ts +102 -0
- package/dist-types/component-hooks/use-consent-labels.d.ts +32 -0
- package/dist-types/component-hooks/use-consent-text-direction.d.ts +22 -0
- package/dist-types/component-hooks/use-vendors-listed-under.d.ts +30 -0
- package/dist-types/components/prompt/atoms/root.d.ts +3 -3
- package/dist-types/components/prompt/prompt.d.ts +4 -3
- package/dist-types/components/prompt/surface-context.d.ts +1 -14
- package/dist-types/components/prompt/use-banner-copy.d.ts +8 -3
- package/dist-types/components/shared/streamed-surface.d.ts +47 -10
- package/dist-types/headless.d.ts +10 -1
- package/dist-types/hooks/use-iab-policy-guard.d.ts +17 -1
- package/dist-types/hooks/use-scroll-lock.d.ts +16 -2
- package/dist-types/index-parts/offline.d.ts +1 -1
- package/dist-types/modes.d.ts +1 -1
- package/dist-types/module-hooks/script-loader.d.ts +9 -0
- package/dist-types/provider.d.ts +3 -3
- package/dist-types/transports/offline.d.ts +2 -2
- package/dist-types/version.d.ts +1 -1
- package/docs/README.md +35 -5
- package/docs/concepts/choose-your-setup.md +9 -9
- package/docs/concepts/consent-state.md +81 -9
- package/docs/concepts/data-fetching.md +30 -23
- package/docs/concepts/modes.md +87 -35
- package/docs/customization/recipes.md +4 -4
- package/docs/customization/stylesheets.md +42 -3
- package/docs/customization/tailwind.md +17 -34
- package/docs/customization/translations.md +18 -12
- package/docs/frameworks/react/clear-on-revocation.md +3 -2
- package/docs/frameworks/react/components/consent-banner.md +3 -3
- package/docs/frameworks/react/components/consent-provider.md +29 -29
- package/docs/frameworks/react/gpp.md +1 -1
- package/docs/frameworks/react/headless.md +146 -19
- package/docs/frameworks/react/hooks.md +2 -1
- package/docs/frameworks/react/iab.md +8 -1
- package/docs/frameworks/react/quickstart.md +2 -2
- package/docs/frameworks/react/rendering.md +1 -1
- package/docs/frameworks/react/translations.md +9 -9
- package/docs/frameworks/react/troubleshooting.md +1 -1
- package/docs/frameworks/react/upgrade-v3.md +39 -32
- package/docs/frameworks/react/vendor-consent.md +5 -0
- package/docs/guides/banner-experiments.md +3 -3
- package/docs/guides/troubleshooting.md +3 -2
- package/docs/integrations/activecampaign.md +297 -0
- package/docs/integrations/ada.md +396 -0
- package/docs/integrations/adobe-analytics.md +2 -2
- package/docs/integrations/adobe-target.md +460 -0
- package/docs/integrations/adroll.md +336 -0
- package/docs/integrations/ahrefs-analytics.md +2 -2
- package/docs/integrations/amazon-ads.md +424 -0
- package/docs/integrations/amplitude.md +2 -2
- package/docs/integrations/appcues.md +368 -0
- package/docs/integrations/attentive.md +313 -0
- package/docs/integrations/building-integrations.md +29 -16
- package/docs/integrations/clay.md +305 -0
- package/docs/integrations/clearbit.md +3 -3
- package/docs/integrations/cloudflare-web-analytics.md +2 -2
- package/docs/integrations/cloudflare-zaraz.md +2 -2
- package/docs/integrations/crisp.md +2 -2
- package/docs/integrations/customer-io.md +369 -0
- package/docs/integrations/databuddy.md +127 -52
- package/docs/integrations/default-com.md +497 -0
- package/docs/integrations/dynamic-yield.md +373 -0
- package/docs/integrations/fathom-analytics.md +2 -2
- package/docs/integrations/front-chat.md +2 -2
- package/docs/integrations/fullstory.md +298 -0
- package/docs/integrations/gainsight-px.md +418 -0
- package/docs/integrations/google-maps.md +2 -2
- package/docs/integrations/google-tag-manager.md +59 -2
- package/docs/integrations/google-tag.md +2 -2
- package/docs/integrations/gorgias.md +365 -0
- package/docs/integrations/heap.md +2 -2
- package/docs/integrations/hightouch.md +2 -2
- package/docs/integrations/hotjar.md +40 -26
- package/docs/integrations/hubspot.md +529 -0
- package/docs/integrations/insider.md +550 -0
- package/docs/integrations/intercom.md +2 -2
- package/docs/integrations/klaviyo.md +2 -2
- package/docs/integrations/linkedin-insights.md +2 -2
- package/docs/integrations/liveintent.md +327 -0
- package/docs/integrations/logrocket.md +2 -2
- package/docs/integrations/lucky-orange.md +336 -0
- package/docs/integrations/marketo.md +309 -0
- package/docs/integrations/matomo-analytics.md +2 -2
- package/docs/integrations/meta-pixel.md +2 -2
- package/docs/integrations/microsoft-clarity.md +2 -2
- package/docs/integrations/microsoft-uet.md +2 -2
- package/docs/integrations/mixpanel-analytics.md +2 -2
- package/docs/integrations/one-dollar-stats.md +2 -2
- package/docs/integrations/openai-pixel.md +2 -2
- package/docs/integrations/optimizely.md +411 -0
- package/docs/integrations/oracle-eloqua.md +301 -0
- package/docs/integrations/overview.md +128 -81
- package/docs/integrations/pendo.md +339 -0
- package/docs/integrations/pinterest-tag.md +2 -2
- package/docs/integrations/pirsch.md +2 -2
- package/docs/integrations/plausible-analytics.md +2 -2
- package/docs/integrations/posthog.md +2 -2
- package/docs/integrations/promptwatch.md +2 -2
- package/docs/integrations/rb2b.md +363 -0
- package/docs/integrations/reddit-pixel.md +2 -2
- package/docs/integrations/rudderstack.md +2 -2
- package/docs/integrations/rybbit-analytics.md +2 -2
- package/docs/integrations/salesforce-pardot.md +342 -0
- package/docs/integrations/segment.md +2 -2
- package/docs/integrations/sentry.md +2 -2
- package/docs/integrations/shopify.md +323 -0
- package/docs/integrations/snapchat-pixel.md +2 -2
- package/docs/integrations/statable-analytics.md +345 -0
- package/docs/integrations/the-trade-desk.md +328 -0
- package/docs/integrations/tiktok-pixel.md +2 -2
- package/docs/integrations/umami-analytics.md +2 -2
- package/docs/integrations/vector.md +333 -0
- package/docs/integrations/vercel-analytics.md +2 -2
- package/docs/integrations/vercel-speed-insights.md +7 -2
- package/docs/integrations/wisepops.md +416 -0
- package/docs/integrations/x-pixel.md +2 -2
- package/docs/integrations/youtube.md +2 -2
- package/docs/integrations/zendesk.md +359 -0
- package/package.json +10 -32
- package/dist/components/prompt/resolve-banner-primary-actions.js +0 -1
- package/dist-types/components/prompt/resolve-banner-primary-actions.d.ts +0 -14
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Marketo Munchkin
|
|
3
|
+
description: Load Adobe Marketo Munchkin after marketing consent, configure its
|
|
4
|
+
account and cookie options, and verify tracking and revocation with c15t.
|
|
5
|
+
seoTitle: Marketo Munchkin cookie consent with c15t
|
|
6
|
+
seoDescription: Wait for marketing consent before loading Marketo Munchkin. Set
|
|
7
|
+
your account ID, configure cookies and check revocation with c15t.
|
|
8
|
+
icon: chart-line
|
|
9
|
+
group: integrations
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Munchkin is Adobe Marketo's script for tracking known and anonymous leads on
|
|
13
|
+
your site. The c15t `marketoMunchkin` helper waits for `marketing` consent
|
|
14
|
+
before it requests Munchkin or initializes tracking. Until then, it creates no
|
|
15
|
+
Munchkin global, cookie or browser storage.
|
|
16
|
+
|
|
17
|
+
Munchkin has no API to stop tracking. When the visitor withdraws, c15t removes
|
|
18
|
+
the loader and reloads the page, and the reload ends tracking.
|
|
19
|
+
|
|
20
|
+
## Configure Marketo Munchkin
|
|
21
|
+
|
|
22
|
+
Copy your Munchkin account ID from Marketo's installation snippet. Then remove
|
|
23
|
+
the Munchkin tag from your site, so that c15t controls when it loads.
|
|
24
|
+
|
|
25
|
+
| Package manager | Command |
|
|
26
|
+
| :-------------- | :------------------------------- |
|
|
27
|
+
| npm | `npm install @c15t/integrations` |
|
|
28
|
+
| pnpm | `pnpm add @c15t/integrations` |
|
|
29
|
+
| yarn | `yarn add @c15t/integrations` |
|
|
30
|
+
| bun | `bun add @c15t/integrations` |
|
|
31
|
+
|
|
32
|
+
```ts title="src/consent-scripts.ts"
|
|
33
|
+
import { marketoMunchkin } from '@c15t/integrations/marketo';
|
|
34
|
+
|
|
35
|
+
export const scripts = [marketoMunchkin({ munchkinId: 'AAA-BBB-CCC' })];
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Register the scripts
|
|
39
|
+
|
|
40
|
+
Complete your [framework quickstart](https://c15t.com/docs/frameworks) first. Keep its Inth
|
|
41
|
+
endpoint, policy, styles and consent UI. Remove the vendor's original script,
|
|
42
|
+
SDK initializer or tag-manager entry, so the vendor loads only through c15t.
|
|
43
|
+
|
|
44
|
+
The vendor pages put the helper in `src/consent-scripts.ts`. If your framework
|
|
45
|
+
quickstart already has a `scripts` array, such as the one in `c15t.config.ts`
|
|
46
|
+
in the Next.js guide, add the helper to that array instead of creating a
|
|
47
|
+
second file.
|
|
48
|
+
The `scripts` export is a configuration, not an initializer. Add it to the c15t provider you already have, at the registration
|
|
49
|
+
point for your framework below. These are edits to that provider, not a second
|
|
50
|
+
provider.
|
|
51
|
+
|
|
52
|
+
**Next.js**
|
|
53
|
+
|
|
54
|
+
Add the configuration to `scripts` in `c15t.config.ts`, next to
|
|
55
|
+
`next.config.ts`:
|
|
56
|
+
|
|
57
|
+
```ts title="c15t.config.ts"
|
|
58
|
+
import { defineConsentConfig } from 'c15t/next';
|
|
59
|
+
import { scripts } from './src/consent-scripts';
|
|
60
|
+
|
|
61
|
+
export default defineConsentConfig({ scripts });
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Keep the rest of your config, such as `mode` and `routePrefix`, in the
|
|
65
|
+
same call. `ConsentRoot` reads the config in the browser, so the layout
|
|
66
|
+
keeps passing only `state`. App Router, Pages Router and static export all
|
|
67
|
+
read the same file. See
|
|
68
|
+
[Next.js scripts and embeds](https://c15t.com/docs/frameworks/next/scripts).
|
|
69
|
+
|
|
70
|
+
**TanStack Start**
|
|
71
|
+
|
|
72
|
+
Import the configuration into your root route and pass it to the existing
|
|
73
|
+
`ConsentRoot` as a top-level prop. Keep the loader from the
|
|
74
|
+
[TanStack Start quickstart](https://c15t.com/docs/frameworks/tanstack-start/quickstart):
|
|
75
|
+
|
|
76
|
+
```tsx title="src/routes/__root.tsx"
|
|
77
|
+
import { scripts } from '../consent-scripts';
|
|
78
|
+
|
|
79
|
+
<ConsentRoot state={consent} scripts={scripts}>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Import vendor helpers in the root route module, not in a server function.
|
|
83
|
+
A server function's return value must be serializable, and script
|
|
84
|
+
configurations carry callbacks. See
|
|
85
|
+
[TanStack Start scripts](https://c15t.com/docs/frameworks/tanstack-start/scripts).
|
|
86
|
+
|
|
87
|
+
**React**
|
|
88
|
+
|
|
89
|
+
Add the configuration to the existing `ConsentProvider` options, next to
|
|
90
|
+
`mode`:
|
|
91
|
+
|
|
92
|
+
```tsx title="src/consent.tsx"
|
|
93
|
+
import { scripts } from './consent-scripts';
|
|
94
|
+
|
|
95
|
+
<ConsentProvider options={{ mode, scripts }}>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
`mode` is the `manifest()` value from the
|
|
99
|
+
[React quickstart](../frameworks/react/quickstart.md). Keep the banner,
|
|
100
|
+
dialog and preferences link inside the provider. See
|
|
101
|
+
[React scripts and embeds](../frameworks/react/scripts.md).
|
|
102
|
+
|
|
103
|
+
**Nuxt**
|
|
104
|
+
|
|
105
|
+
Register the scripts under the `c15t` key in `app/app.config.ts`. Adjust the
|
|
106
|
+
relative import to where you created `consent-scripts.ts`:
|
|
107
|
+
|
|
108
|
+
```ts title="app/app.config.ts"
|
|
109
|
+
import { scripts } from '../src/consent-scripts';
|
|
110
|
+
|
|
111
|
+
export default defineAppConfig({
|
|
112
|
+
c15t: { scripts },
|
|
113
|
+
});
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
The Nuxt module merges this over its options in `nuxt.config.ts` and starts
|
|
117
|
+
one script loader in the browser after hydration, once it has applied the
|
|
118
|
+
visitor's stored choice and privacy signals. Keep `scripts` out of
|
|
119
|
+
`nuxt.config.ts`, which reaches the browser as JSON and drops the vendor
|
|
120
|
+
callbacks. Write the vendor IDs into `consent-scripts.ts`. See
|
|
121
|
+
[Nuxt scripts and embeds](https://c15t.com/docs/frameworks/nuxt/scripts).
|
|
122
|
+
|
|
123
|
+
**Vue**
|
|
124
|
+
|
|
125
|
+
Pass the scripts to the existing `c15tVue` plugin call in `src/main.ts`:
|
|
126
|
+
|
|
127
|
+
```ts title="src/main.ts"
|
|
128
|
+
import { c15tVue, manifest } from 'c15t/vue/vue-plugin';
|
|
129
|
+
import { scripts } from './consent-scripts';
|
|
130
|
+
|
|
131
|
+
app.use(c15tVue, {
|
|
132
|
+
mode: manifest(),
|
|
133
|
+
scripts,
|
|
134
|
+
});
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Keep your existing `mode` and other options. The plugin starts one
|
|
138
|
+
script loader when the app mounts, after it has applied the visitor's stored
|
|
139
|
+
choice. Do not also call `createScriptLoader` from a component. See
|
|
140
|
+
[Vue scripts and embeds](https://c15t.com/docs/frameworks/vue/scripts).
|
|
141
|
+
|
|
142
|
+
**Astro**
|
|
143
|
+
|
|
144
|
+
Add the scripts to the client entrypoint from the
|
|
145
|
+
[Astro quickstart](https://c15t.com/docs/frameworks/astro/quickstart), `src/c15t.client.ts`,
|
|
146
|
+
which the integration finds on its own. Keep `astro.config.mjs` as it is.
|
|
147
|
+
If the module already exports scripts, combine the two arrays.
|
|
148
|
+
|
|
149
|
+
```ts title="src/c15t.client.ts"
|
|
150
|
+
import type { C15tClientOptionsExtension } from 'c15t/astro';
|
|
151
|
+
import { scripts } from './consent-scripts';
|
|
152
|
+
|
|
153
|
+
export default { scripts } satisfies C15tClientOptionsExtension;
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Vendor helpers contain callbacks, and the integration options in
|
|
157
|
+
`astro.config.mjs` are serialized into the page, so do not put helpers in
|
|
158
|
+
the integration's `scripts` option. The integration passes the client
|
|
159
|
+
entrypoint to the one runtime every page shares, including across
|
|
160
|
+
`ClientRouter` navigation.
|
|
161
|
+
|
|
162
|
+
**Svelte**
|
|
163
|
+
|
|
164
|
+
Import the scripts in the component that owns your existing provider and
|
|
165
|
+
pass them as a top-level prop:
|
|
166
|
+
|
|
167
|
+
```svelte title="src/App.svelte"
|
|
168
|
+
<script lang="ts">
|
|
169
|
+
import { ConsentProvider, manifest } from 'c15t/svelte';
|
|
170
|
+
import { scripts } from './consent-scripts';
|
|
171
|
+
</script>
|
|
172
|
+
|
|
173
|
+
<ConsentProvider mode={manifest()} {scripts}>
|
|
174
|
+
<!-- Keep your application, consent UI and preferences link here. -->
|
|
175
|
+
</ConsentProvider>
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Retain the styles and consent UI from the [Svelte quickstart](https://c15t.com/docs/frameworks/svelte/quickstart).
|
|
179
|
+
The provider owns the loader and disposes it on unmount.
|
|
180
|
+
|
|
181
|
+
**SvelteKit**
|
|
182
|
+
|
|
183
|
+
Add the scripts to the existing `ConsentRoot` in the root layout. Keep the
|
|
184
|
+
handle and the layout load from the [SvelteKit quickstart](https://c15t.com/docs/frameworks/sveltekit/quickstart).
|
|
185
|
+
|
|
186
|
+
```svelte title="src/routes/+layout.svelte"
|
|
187
|
+
<script lang="ts">
|
|
188
|
+
import { ConsentRoot } from 'c15t/svelte';
|
|
189
|
+
import { scripts } from '../consent-scripts';
|
|
190
|
+
|
|
191
|
+
let { children, data } = $props();
|
|
192
|
+
</script>
|
|
193
|
+
|
|
194
|
+
<ConsentRoot state={data.consent} {scripts}>
|
|
195
|
+
{@render children()}
|
|
196
|
+
<!-- Keep your consent UI and preferences link here. -->
|
|
197
|
+
</ConsentRoot>
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Import vendor helpers in the layout component, not in `+layout.server.ts`:
|
|
201
|
+
a server load cannot send functions to the browser. Prerendered, static and
|
|
202
|
+
SPA-mode pages use the same `scripts` prop. If you pass an externally owned
|
|
203
|
+
`runtime` to the provider, register scripts when creating that runtime instead.
|
|
204
|
+
|
|
205
|
+
**HTML**
|
|
206
|
+
|
|
207
|
+
The helpers in `@c15t/integrations` are ES modules that need a bundler. On a
|
|
208
|
+
page that loads the c15t script tag, paste the vendor's own snippet instead
|
|
209
|
+
and keep it inert until its category is allowed:
|
|
210
|
+
|
|
211
|
+
```html
|
|
212
|
+
<script type="text/plain" data-c15t-category="measurement">
|
|
213
|
+
// The vendor's snippet, unchanged
|
|
214
|
+
</script>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Use the category this guide names for the vendor. c15t runs the snippet
|
|
218
|
+
once that category is allowed, and reloads the page when the visitor
|
|
219
|
+
withdraws it. Helper options on this page, such as `loadMode`, do not apply
|
|
220
|
+
to a pasted snippet. See [HTML scripts](https://c15t.com/docs/frameworks/html/scripts).
|
|
221
|
+
|
|
222
|
+
**JavaScript**
|
|
223
|
+
|
|
224
|
+
Pass the scripts to `init()` from `@c15t/browser`, next to your mode:
|
|
225
|
+
|
|
226
|
+
```ts
|
|
227
|
+
import { init, manifest } from '@c15t/browser';
|
|
228
|
+
import { scripts } from './consent-scripts';
|
|
229
|
+
|
|
230
|
+
const consent = init({
|
|
231
|
+
mode: manifest(),
|
|
232
|
+
scripts,
|
|
233
|
+
});
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Keep the mode from your quickstart. With
|
|
237
|
+
`createConsentRuntime` from `c15t/runtime`, pass `scripts` to it instead.
|
|
238
|
+
A kernel you create yourself needs a loader from
|
|
239
|
+
`c15t/modules/script-loader`. Attach one loader per kernel. See
|
|
240
|
+
[JavaScript scripts](https://c15t.com/docs/frameworks/javascript/scripts).
|
|
241
|
+
|
|
242
|
+
## Options
|
|
243
|
+
|
|
244
|
+
| Option | Default | Behavior |
|
|
245
|
+
| ------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
|
|
246
|
+
| `munchkinId` | Required | Public account ID. Whitespace is trimmed. If it's missing or blank, c15t logs an error and never loads Munchkin. |
|
|
247
|
+
| `initOptions` | `{}` | Passed to `Munchkin.init`, for example `cookieAnon`, `anonymizeIP`, `apiOnly` and `cookieLifeDays`. |
|
|
248
|
+
| `category` | `marketing` | Consent condition that gates the whole loader. |
|
|
249
|
+
| `scriptUrl` | `https://munchkin.marketo.net/munchkin.js` | Custom or proxied loader URL. Blank values use the default. Other Munchkin requests need their own proxy configuration. |
|
|
250
|
+
|
|
251
|
+
`cookieAnon: false` stops Munchkin from creating cookies for new anonymous
|
|
252
|
+
visitors and tracking them. It is not a consent switch. Visitors who already
|
|
253
|
+
have a tracking cookie are still tracked.
|
|
254
|
+
|
|
255
|
+
## Loading and revocation
|
|
256
|
+
|
|
257
|
+
After consent, c15t downloads the SDK and calls `Munchkin.init` once with the
|
|
258
|
+
account ID and `initOptions`. If the visitor withdraws while the SDK
|
|
259
|
+
downloads, the helper skips initialization. Changes to other categories don't
|
|
260
|
+
initialize Munchkin again.
|
|
261
|
+
|
|
262
|
+
Keep `reloadOnConsentRevoked` enabled. Removing the loader doesn't stop the
|
|
263
|
+
running SDK or its listeners. The next page doesn't load Munchkin while its
|
|
264
|
+
consent is denied.
|
|
265
|
+
|
|
266
|
+
## Cookies and storage
|
|
267
|
+
|
|
268
|
+
Munchkin can set `_mkto_trk` for two years by default. The reload doesn't
|
|
269
|
+
remove it. Marketo's separate `marketo_opt_out=true` URL flow sets
|
|
270
|
+
`mkto_opt_out` and turns tracking off. The helper doesn't set that opt-out,
|
|
271
|
+
because it would also block tracking after a later consent grant.
|
|
272
|
+
|
|
273
|
+
## Verify Marketo Munchkin
|
|
274
|
+
|
|
275
|
+
Filter the Network panel by `munchkin.marketo.net`. Before consent, check that
|
|
276
|
+
there is no loader request, no `window.Munchkin`, no `_mkto_trk` cookie and no
|
|
277
|
+
vendor browser storage. Allow the category set in `category`, which defaults
|
|
278
|
+
to `marketing`, and check that the SDK loads and initializes. Reject that
|
|
279
|
+
category again and check that the reloaded page makes no Munchkin request. For
|
|
280
|
+
example, with `category: 'experience'`, allow and reject `experience`.
|
|
281
|
+
|
|
282
|
+
Sources: Adobe's [async installation snippet](https://experienceleague.adobe.com/en/docs/marketo-developer/marketo/javascriptapi/leadtracking/lead-tracking)
|
|
283
|
+
and [configuration reference](https://experienceleague.adobe.com/en/docs/marketo-developer/marketo/javascriptapi/leadtracking/configuration).
|
|
284
|
+
|
|
285
|
+
Test in a private window with an opt-in policy. Open DevTools Network, disable
|
|
286
|
+
the cache and filter by the vendor's domain:
|
|
287
|
+
|
|
288
|
+
1. Load the page. No request goes to the vendor before you choose.
|
|
289
|
+
2. Click Reject, then reload. There is still no vendor request.
|
|
290
|
+
3. Open Privacy settings and allow the helper's category. The vendor script
|
|
291
|
+
loads without a page reload.
|
|
292
|
+
4. Turn the category off again and save. c15t reloads the page, and the new
|
|
293
|
+
page makes no vendor request.
|
|
294
|
+
|
|
295
|
+
c15t reloads on revocation because removing a script element does not stop
|
|
296
|
+
code that already ran. The vendor's listeners, timers and queued events stay
|
|
297
|
+
alive until the page unloads. If you set `reloadOnConsentRevoked: false`, stop
|
|
298
|
+
the vendor yourself. Register a callback-only script whose `onConsentChange`
|
|
299
|
+
calls the vendor's opt-out API, as shown in
|
|
300
|
+
[custom integrations](./building-integrations.md), and check the
|
|
301
|
+
permission before each of your own event calls. The reload does not delete
|
|
302
|
+
cookies the vendor already set; see
|
|
303
|
+
[clear on revocation for your framework](./overview.md#vendor-switches-and-cookie-cleanup).
|
|
304
|
+
|
|
305
|
+
The helper lists its vendor by name in the preference dialog, so a visitor can
|
|
306
|
+
turn it off inside an allowed category. See
|
|
307
|
+
[vendor consent for your framework](./overview.md#vendor-switches-and-cookie-cleanup). The
|
|
308
|
+
[consent verification guide](../guides/verify-consent.md) covers navigation,
|
|
309
|
+
expiry and hosting checks.
|
|
@@ -170,7 +170,7 @@ pass them as a top-level prop:
|
|
|
170
170
|
|
|
171
171
|
```svelte title="src/App.svelte"
|
|
172
172
|
<script lang="ts">
|
|
173
|
-
import { ConsentProvider, manifest } from '
|
|
173
|
+
import { ConsentProvider, manifest } from 'c15t/svelte';
|
|
174
174
|
import { scripts } from './consent-scripts';
|
|
175
175
|
</script>
|
|
176
176
|
|
|
@@ -189,7 +189,7 @@ handle and the layout load from the [SvelteKit quickstart](https://c15t.com/docs
|
|
|
189
189
|
|
|
190
190
|
```svelte title="src/routes/+layout.svelte"
|
|
191
191
|
<script lang="ts">
|
|
192
|
-
import { ConsentRoot } from '
|
|
192
|
+
import { ConsentRoot } from 'c15t/svelte';
|
|
193
193
|
import { scripts } from '../consent-scripts';
|
|
194
194
|
|
|
195
195
|
let { children, data } = $props();
|
|
@@ -166,7 +166,7 @@ pass them as a top-level prop:
|
|
|
166
166
|
|
|
167
167
|
```svelte title="src/App.svelte"
|
|
168
168
|
<script lang="ts">
|
|
169
|
-
import { ConsentProvider, manifest } from '
|
|
169
|
+
import { ConsentProvider, manifest } from 'c15t/svelte';
|
|
170
170
|
import { scripts } from './consent-scripts';
|
|
171
171
|
</script>
|
|
172
172
|
|
|
@@ -185,7 +185,7 @@ handle and the layout load from the [SvelteKit quickstart](https://c15t.com/docs
|
|
|
185
185
|
|
|
186
186
|
```svelte title="src/routes/+layout.svelte"
|
|
187
187
|
<script lang="ts">
|
|
188
|
-
import { ConsentRoot } from '
|
|
188
|
+
import { ConsentRoot } from 'c15t/svelte';
|
|
189
189
|
import { scripts } from '../consent-scripts';
|
|
190
190
|
|
|
191
191
|
let { children, data } = $props();
|
|
@@ -166,7 +166,7 @@ pass them as a top-level prop:
|
|
|
166
166
|
|
|
167
167
|
```svelte title="src/App.svelte"
|
|
168
168
|
<script lang="ts">
|
|
169
|
-
import { ConsentProvider, manifest } from '
|
|
169
|
+
import { ConsentProvider, manifest } from 'c15t/svelte';
|
|
170
170
|
import { scripts } from './consent-scripts';
|
|
171
171
|
</script>
|
|
172
172
|
|
|
@@ -185,7 +185,7 @@ handle and the layout load from the [SvelteKit quickstart](https://c15t.com/docs
|
|
|
185
185
|
|
|
186
186
|
```svelte title="src/routes/+layout.svelte"
|
|
187
187
|
<script lang="ts">
|
|
188
|
-
import { ConsentRoot } from '
|
|
188
|
+
import { ConsentRoot } from 'c15t/svelte';
|
|
189
189
|
import { scripts } from '../consent-scripts';
|
|
190
190
|
|
|
191
191
|
let { children, data } = $props();
|
|
@@ -168,7 +168,7 @@ pass them as a top-level prop:
|
|
|
168
168
|
|
|
169
169
|
```svelte title="src/App.svelte"
|
|
170
170
|
<script lang="ts">
|
|
171
|
-
import { ConsentProvider, manifest } from '
|
|
171
|
+
import { ConsentProvider, manifest } from 'c15t/svelte';
|
|
172
172
|
import { scripts } from './consent-scripts';
|
|
173
173
|
</script>
|
|
174
174
|
|
|
@@ -187,7 +187,7 @@ handle and the layout load from the [SvelteKit quickstart](https://c15t.com/docs
|
|
|
187
187
|
|
|
188
188
|
```svelte title="src/routes/+layout.svelte"
|
|
189
189
|
<script lang="ts">
|
|
190
|
-
import { ConsentRoot } from '
|
|
190
|
+
import { ConsentRoot } from 'c15t/svelte';
|
|
191
191
|
import { scripts } from '../consent-scripts';
|
|
192
192
|
|
|
193
193
|
let { children, data } = $props();
|
|
@@ -177,7 +177,7 @@ pass them as a top-level prop:
|
|
|
177
177
|
|
|
178
178
|
```svelte title="src/App.svelte"
|
|
179
179
|
<script lang="ts">
|
|
180
|
-
import { ConsentProvider, manifest } from '
|
|
180
|
+
import { ConsentProvider, manifest } from 'c15t/svelte';
|
|
181
181
|
import { scripts } from './consent-scripts';
|
|
182
182
|
</script>
|
|
183
183
|
|
|
@@ -196,7 +196,7 @@ handle and the layout load from the [SvelteKit quickstart](https://c15t.com/docs
|
|
|
196
196
|
|
|
197
197
|
```svelte title="src/routes/+layout.svelte"
|
|
198
198
|
<script lang="ts">
|
|
199
|
-
import { ConsentRoot } from '
|
|
199
|
+
import { ConsentRoot } from 'c15t/svelte';
|
|
200
200
|
import { scripts } from '../consent-scripts';
|
|
201
201
|
|
|
202
202
|
let { children, data } = $props();
|
|
@@ -164,7 +164,7 @@ pass them as a top-level prop:
|
|
|
164
164
|
|
|
165
165
|
```svelte title="src/App.svelte"
|
|
166
166
|
<script lang="ts">
|
|
167
|
-
import { ConsentProvider, manifest } from '
|
|
167
|
+
import { ConsentProvider, manifest } from 'c15t/svelte';
|
|
168
168
|
import { scripts } from './consent-scripts';
|
|
169
169
|
</script>
|
|
170
170
|
|
|
@@ -183,7 +183,7 @@ handle and the layout load from the [SvelteKit quickstart](https://c15t.com/docs
|
|
|
183
183
|
|
|
184
184
|
```svelte title="src/routes/+layout.svelte"
|
|
185
185
|
<script lang="ts">
|
|
186
|
-
import { ConsentRoot } from '
|
|
186
|
+
import { ConsentRoot } from 'c15t/svelte';
|
|
187
187
|
import { scripts } from '../consent-scripts';
|
|
188
188
|
|
|
189
189
|
let { children, data } = $props();
|
|
@@ -169,7 +169,7 @@ pass them as a top-level prop:
|
|
|
169
169
|
|
|
170
170
|
```svelte title="src/App.svelte"
|
|
171
171
|
<script lang="ts">
|
|
172
|
-
import { ConsentProvider, manifest } from '
|
|
172
|
+
import { ConsentProvider, manifest } from 'c15t/svelte';
|
|
173
173
|
import { scripts } from './consent-scripts';
|
|
174
174
|
</script>
|
|
175
175
|
|
|
@@ -188,7 +188,7 @@ handle and the layout load from the [SvelteKit quickstart](https://c15t.com/docs
|
|
|
188
188
|
|
|
189
189
|
```svelte title="src/routes/+layout.svelte"
|
|
190
190
|
<script lang="ts">
|
|
191
|
-
import { ConsentRoot } from '
|
|
191
|
+
import { ConsentRoot } from 'c15t/svelte';
|
|
192
192
|
import { scripts } from '../consent-scripts';
|
|
193
193
|
|
|
194
194
|
let { children, data } = $props();
|