@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,368 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Appcues
|
|
3
|
+
description: Load Appcues onboarding flows after experience consent, configure
|
|
4
|
+
US or EU accounts, and reset the visitor on revocation.
|
|
5
|
+
seoTitle: Appcues cookie consent with c15t
|
|
6
|
+
seoDescription: Gate the Appcues SDK on experience consent with c15t. Configure
|
|
7
|
+
account settings, reset user state on revocation, and verify browser storage.
|
|
8
|
+
icon: list-checks
|
|
9
|
+
group: integrations
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Appcues shows onboarding flows, tooltips and checklists inside your app. The
|
|
13
|
+
c15t `appcues` helper waits for `experience` consent before it sets
|
|
14
|
+
`AppcuesSettings` or requests the SDK.
|
|
15
|
+
|
|
16
|
+
On withdrawal, the helper calls `Appcues.reset()` and removes the loader, then
|
|
17
|
+
c15t reloads the page. `reset()` clears the user and any flow in progress, but
|
|
18
|
+
the SDK keeps running until the reload, so keep `reloadOnConsentRevoked` on.
|
|
19
|
+
|
|
20
|
+
## Configure Appcues
|
|
21
|
+
|
|
22
|
+
Copy your account ID from the
|
|
23
|
+
[Appcues installation snippet](https://docs.appcues.com/install-appcues-web/install-the-appcues-sdk).
|
|
24
|
+
Set `region: 'eu'` for an EU account. Then remove the Appcues snippet and any
|
|
25
|
+
tag-manager entry so Appcues can't load outside c15t.
|
|
26
|
+
|
|
27
|
+
| Package manager | Command |
|
|
28
|
+
| :-------------- | :------------------------------- |
|
|
29
|
+
| npm | `npm install @c15t/integrations` |
|
|
30
|
+
| pnpm | `pnpm add @c15t/integrations` |
|
|
31
|
+
| yarn | `yarn add @c15t/integrations` |
|
|
32
|
+
| bun | `bun add @c15t/integrations` |
|
|
33
|
+
|
|
34
|
+
```ts title="src/consent-scripts.ts"
|
|
35
|
+
import { appcues } from '@c15t/integrations/appcues';
|
|
36
|
+
|
|
37
|
+
export const scripts = [
|
|
38
|
+
appcues({
|
|
39
|
+
accountId: 'YOUR_APPCUES_ID',
|
|
40
|
+
onReady: () => {
|
|
41
|
+
// Read the signed-in visitor from your auth state here.
|
|
42
|
+
// Enable only with their real, unique, stable ID; skip if signed out.
|
|
43
|
+
// window.Appcues?.identify?.('CURRENT_USER_ID');
|
|
44
|
+
// After identify, enable with the visitor's real group ID if needed.
|
|
45
|
+
// window.Appcues?.group?.('CURRENT_GROUP_ID');
|
|
46
|
+
// After identify, track only an event that actually happened.
|
|
47
|
+
// window.Appcues?.track?.('Started onboarding');
|
|
48
|
+
},
|
|
49
|
+
}),
|
|
50
|
+
];
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Inside `onReady`, read the signed-in user from your auth state. Replace the
|
|
54
|
+
`identify` placeholder with that user's real, unique, stable ID before you
|
|
55
|
+
enable the call. Enable `group` after `identify` with the real group ID, if
|
|
56
|
+
you need it. Send `track` only for an event that actually happened. Skip
|
|
57
|
+
these calls when nobody is signed in. `onReady` runs once per successful
|
|
58
|
+
loader load, including when consent was already granted at page startup.
|
|
59
|
+
|
|
60
|
+
If sign-in completes after `onReady`, identify the user from your app's auth
|
|
61
|
+
change handler. Right before you call `window.Appcues.identify`, check that
|
|
62
|
+
the method exists, the user is still signed in, and c15t's current consent
|
|
63
|
+
allows both the script's category and the `appcues` vendor. The category
|
|
64
|
+
defaults to `experience`; check your override instead if you changed it. Skip
|
|
65
|
+
identification if any check fails. If Appcues hasn't loaded yet, let
|
|
66
|
+
`onReady` read the current user when it runs.
|
|
67
|
+
|
|
68
|
+
## Register the scripts
|
|
69
|
+
|
|
70
|
+
Complete your [framework quickstart](https://c15t.com/docs/frameworks) first. Keep its Inth
|
|
71
|
+
endpoint, policy, styles and consent UI. Remove the vendor's original script,
|
|
72
|
+
SDK initializer or tag-manager entry, so the vendor loads only through c15t.
|
|
73
|
+
|
|
74
|
+
The vendor pages put the helper in `src/consent-scripts.ts`. If your framework
|
|
75
|
+
quickstart already has a `scripts` array, such as the one in `c15t.config.ts`
|
|
76
|
+
in the Next.js guide, add the helper to that array instead of creating a
|
|
77
|
+
second file.
|
|
78
|
+
The `scripts` export is a configuration, not an initializer. Add it to the c15t provider you already have, at the registration
|
|
79
|
+
point for your framework below. These are edits to that provider, not a second
|
|
80
|
+
provider.
|
|
81
|
+
|
|
82
|
+
**Next.js**
|
|
83
|
+
|
|
84
|
+
Add the configuration to `scripts` in `c15t.config.ts`, next to
|
|
85
|
+
`next.config.ts`:
|
|
86
|
+
|
|
87
|
+
```ts title="c15t.config.ts"
|
|
88
|
+
import { defineConsentConfig } from 'c15t/next';
|
|
89
|
+
import { scripts } from './src/consent-scripts';
|
|
90
|
+
|
|
91
|
+
export default defineConsentConfig({ scripts });
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Keep the rest of your config, such as `mode` and `routePrefix`, in the
|
|
95
|
+
same call. `ConsentRoot` reads the config in the browser, so the layout
|
|
96
|
+
keeps passing only `state`. App Router, Pages Router and static export all
|
|
97
|
+
read the same file. See
|
|
98
|
+
[Next.js scripts and embeds](https://c15t.com/docs/frameworks/next/scripts).
|
|
99
|
+
|
|
100
|
+
**TanStack Start**
|
|
101
|
+
|
|
102
|
+
Import the configuration into your root route and pass it to the existing
|
|
103
|
+
`ConsentRoot` as a top-level prop. Keep the loader from the
|
|
104
|
+
[TanStack Start quickstart](https://c15t.com/docs/frameworks/tanstack-start/quickstart):
|
|
105
|
+
|
|
106
|
+
```tsx title="src/routes/__root.tsx"
|
|
107
|
+
import { scripts } from '../consent-scripts';
|
|
108
|
+
|
|
109
|
+
<ConsentRoot state={consent} scripts={scripts}>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Import vendor helpers in the root route module, not in a server function.
|
|
113
|
+
A server function's return value must be serializable, and script
|
|
114
|
+
configurations carry callbacks. See
|
|
115
|
+
[TanStack Start scripts](https://c15t.com/docs/frameworks/tanstack-start/scripts).
|
|
116
|
+
|
|
117
|
+
**React**
|
|
118
|
+
|
|
119
|
+
Add the configuration to the existing `ConsentProvider` options, next to
|
|
120
|
+
`mode`:
|
|
121
|
+
|
|
122
|
+
```tsx title="src/consent.tsx"
|
|
123
|
+
import { scripts } from './consent-scripts';
|
|
124
|
+
|
|
125
|
+
<ConsentProvider options={{ mode, scripts }}>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
`mode` is the `manifest()` value from the
|
|
129
|
+
[React quickstart](../frameworks/react/quickstart.md). Keep the banner,
|
|
130
|
+
dialog and preferences link inside the provider. See
|
|
131
|
+
[React scripts and embeds](../frameworks/react/scripts.md).
|
|
132
|
+
|
|
133
|
+
**Nuxt**
|
|
134
|
+
|
|
135
|
+
Register the scripts under the `c15t` key in `app/app.config.ts`. Adjust the
|
|
136
|
+
relative import to where you created `consent-scripts.ts`:
|
|
137
|
+
|
|
138
|
+
```ts title="app/app.config.ts"
|
|
139
|
+
import { scripts } from '../src/consent-scripts';
|
|
140
|
+
|
|
141
|
+
export default defineAppConfig({
|
|
142
|
+
c15t: { scripts },
|
|
143
|
+
});
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
The Nuxt module merges this over its options in `nuxt.config.ts` and starts
|
|
147
|
+
one script loader in the browser after hydration, once it has applied the
|
|
148
|
+
visitor's stored choice and privacy signals. Keep `scripts` out of
|
|
149
|
+
`nuxt.config.ts`, which reaches the browser as JSON and drops the vendor
|
|
150
|
+
callbacks. Write the vendor IDs into `consent-scripts.ts`. See
|
|
151
|
+
[Nuxt scripts and embeds](https://c15t.com/docs/frameworks/nuxt/scripts).
|
|
152
|
+
|
|
153
|
+
**Vue**
|
|
154
|
+
|
|
155
|
+
Pass the scripts to the existing `c15tVue` plugin call in `src/main.ts`:
|
|
156
|
+
|
|
157
|
+
```ts title="src/main.ts"
|
|
158
|
+
import { c15tVue, manifest } from 'c15t/vue/vue-plugin';
|
|
159
|
+
import { scripts } from './consent-scripts';
|
|
160
|
+
|
|
161
|
+
app.use(c15tVue, {
|
|
162
|
+
mode: manifest(),
|
|
163
|
+
scripts,
|
|
164
|
+
});
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Keep your existing `mode` and other options. The plugin starts one
|
|
168
|
+
script loader when the app mounts, after it has applied the visitor's stored
|
|
169
|
+
choice. Do not also call `createScriptLoader` from a component. See
|
|
170
|
+
[Vue scripts and embeds](https://c15t.com/docs/frameworks/vue/scripts).
|
|
171
|
+
|
|
172
|
+
**Astro**
|
|
173
|
+
|
|
174
|
+
Add the scripts to the client entrypoint from the
|
|
175
|
+
[Astro quickstart](https://c15t.com/docs/frameworks/astro/quickstart), `src/c15t.client.ts`,
|
|
176
|
+
which the integration finds on its own. Keep `astro.config.mjs` as it is.
|
|
177
|
+
If the module already exports scripts, combine the two arrays.
|
|
178
|
+
|
|
179
|
+
```ts title="src/c15t.client.ts"
|
|
180
|
+
import type { C15tClientOptionsExtension } from 'c15t/astro';
|
|
181
|
+
import { scripts } from './consent-scripts';
|
|
182
|
+
|
|
183
|
+
export default { scripts } satisfies C15tClientOptionsExtension;
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Vendor helpers contain callbacks, and the integration options in
|
|
187
|
+
`astro.config.mjs` are serialized into the page, so do not put helpers in
|
|
188
|
+
the integration's `scripts` option. The integration passes the client
|
|
189
|
+
entrypoint to the one runtime every page shares, including across
|
|
190
|
+
`ClientRouter` navigation.
|
|
191
|
+
|
|
192
|
+
**Svelte**
|
|
193
|
+
|
|
194
|
+
Import the scripts in the component that owns your existing provider and
|
|
195
|
+
pass them as a top-level prop:
|
|
196
|
+
|
|
197
|
+
```svelte title="src/App.svelte"
|
|
198
|
+
<script lang="ts">
|
|
199
|
+
import { ConsentProvider, manifest } from 'c15t/svelte';
|
|
200
|
+
import { scripts } from './consent-scripts';
|
|
201
|
+
</script>
|
|
202
|
+
|
|
203
|
+
<ConsentProvider mode={manifest()} {scripts}>
|
|
204
|
+
<!-- Keep your application, consent UI and preferences link here. -->
|
|
205
|
+
</ConsentProvider>
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Retain the styles and consent UI from the [Svelte quickstart](https://c15t.com/docs/frameworks/svelte/quickstart).
|
|
209
|
+
The provider owns the loader and disposes it on unmount.
|
|
210
|
+
|
|
211
|
+
**SvelteKit**
|
|
212
|
+
|
|
213
|
+
Add the scripts to the existing `ConsentRoot` in the root layout. Keep the
|
|
214
|
+
handle and the layout load from the [SvelteKit quickstart](https://c15t.com/docs/frameworks/sveltekit/quickstart).
|
|
215
|
+
|
|
216
|
+
```svelte title="src/routes/+layout.svelte"
|
|
217
|
+
<script lang="ts">
|
|
218
|
+
import { ConsentRoot } from 'c15t/svelte';
|
|
219
|
+
import { scripts } from '../consent-scripts';
|
|
220
|
+
|
|
221
|
+
let { children, data } = $props();
|
|
222
|
+
</script>
|
|
223
|
+
|
|
224
|
+
<ConsentRoot state={data.consent} {scripts}>
|
|
225
|
+
{@render children()}
|
|
226
|
+
<!-- Keep your consent UI and preferences link here. -->
|
|
227
|
+
</ConsentRoot>
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Import vendor helpers in the layout component, not in `+layout.server.ts`:
|
|
231
|
+
a server load cannot send functions to the browser. Prerendered, static and
|
|
232
|
+
SPA-mode pages use the same `scripts` prop. If you pass an externally owned
|
|
233
|
+
`runtime` to the provider, register scripts when creating that runtime instead.
|
|
234
|
+
|
|
235
|
+
**HTML**
|
|
236
|
+
|
|
237
|
+
The helpers in `@c15t/integrations` are ES modules that need a bundler. On a
|
|
238
|
+
page that loads the c15t script tag, paste the vendor's own snippet instead
|
|
239
|
+
and keep it inert until its category is allowed:
|
|
240
|
+
|
|
241
|
+
```html
|
|
242
|
+
<script type="text/plain" data-c15t-category="measurement">
|
|
243
|
+
// The vendor's snippet, unchanged
|
|
244
|
+
</script>
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Use the category this guide names for the vendor. c15t runs the snippet
|
|
248
|
+
once that category is allowed, and reloads the page when the visitor
|
|
249
|
+
withdraws it. Helper options on this page, such as `loadMode`, do not apply
|
|
250
|
+
to a pasted snippet. See [HTML scripts](https://c15t.com/docs/frameworks/html/scripts).
|
|
251
|
+
|
|
252
|
+
**JavaScript**
|
|
253
|
+
|
|
254
|
+
Pass the scripts to `init()` from `@c15t/browser`, next to your mode:
|
|
255
|
+
|
|
256
|
+
```ts
|
|
257
|
+
import { init, manifest } from '@c15t/browser';
|
|
258
|
+
import { scripts } from './consent-scripts';
|
|
259
|
+
|
|
260
|
+
const consent = init({
|
|
261
|
+
mode: manifest(),
|
|
262
|
+
scripts,
|
|
263
|
+
});
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Keep the mode from your quickstart. With
|
|
267
|
+
`createConsentRuntime` from `c15t/runtime`, pass `scripts` to it instead.
|
|
268
|
+
A kernel you create yourself needs a loader from
|
|
269
|
+
`c15t/modules/script-loader`. Attach one loader per kernel. See
|
|
270
|
+
[JavaScript scripts](https://c15t.com/docs/frameworks/javascript/scripts).
|
|
271
|
+
|
|
272
|
+
## Options
|
|
273
|
+
|
|
274
|
+
| Option | Default | Behavior |
|
|
275
|
+
| ----------- | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
276
|
+
| `accountId` | Required | Account ID from Appcues. Surrounding whitespace is trimmed and the ID is encoded as one URL path segment. Missing or blank IDs log an error and skip loading. |
|
|
277
|
+
| `region` | `'us'` | Loads from `fast.appcues.com`, or from `fast.eu.appcues.com` for `'eu'`. |
|
|
278
|
+
| `settings` | `{ enableURLDetection: true }` | JSON-serializable `AppcuesSettings`, merged over the default URL detection setting. Replaces any existing `window.AppcuesSettings`. Set `enableURLDetection: false` to handle page changes yourself. |
|
|
279
|
+
| `scriptUrl` | `https://fast.appcues.com/<accountId>.js` | Override for a proxy or custom loader. A blank override uses the default. This changes only the account loader, not later SDK requests. |
|
|
280
|
+
| `onReady` | None | Synchronous callback after the account loader sets `window.Appcues`, while the script still has consent. Runs once per successful loader load. Use it for `identify`, `group` and `track`. |
|
|
281
|
+
|
|
282
|
+
The helper has no `category` option. To change the consent mapping, override
|
|
283
|
+
the returned script's `category` when you register it. The helper has no mode
|
|
284
|
+
that loads before consent.
|
|
285
|
+
|
|
286
|
+
## Loading and revocation
|
|
287
|
+
|
|
288
|
+
After experience consent, c15t sets `AppcuesSettings` and loads
|
|
289
|
+
`https://fast.appcues.com/<accountId>.js`, or the EU host for `region: 'eu'`.
|
|
290
|
+
The account loader requests the Appcues runtime. Put startup calls to
|
|
291
|
+
`identify`, `group` and `track` inside `onReady`. The account loader exposes
|
|
292
|
+
these methods and buffers calls until the runtime finishes loading, as in
|
|
293
|
+
Appcues' documented `AppcuesReady` pattern. c15t doesn't create an
|
|
294
|
+
`AppcuesReady` global or queue visitor callbacks. If the loader fails or
|
|
295
|
+
doesn't set `window.Appcues`, `onReady` doesn't run.
|
|
296
|
+
|
|
297
|
+
Revoking consent or removing a pending loader stops its `onReady` from
|
|
298
|
+
running. A new grant starts a new loader. Recreating the helper before the
|
|
299
|
+
download completes uses the current callback. Recreating it after completion
|
|
300
|
+
doesn't replay `onReady`. Read the current visitor inside the callback, and
|
|
301
|
+
check consent again for later calls. If you start async work inside
|
|
302
|
+
`onReady`, check consent and auth again before you call Appcues after an
|
|
303
|
+
`await`, timer or event.
|
|
304
|
+
|
|
305
|
+
On revocation, c15t calls the documented
|
|
306
|
+
[`Appcues.reset()`](https://docs.appcues.com/dev-api-data/javascript-api-developer)
|
|
307
|
+
when it's available and removes the loader element. Reset clears user state
|
|
308
|
+
and flows in progress. It doesn't unload the SDK, stop every listener or
|
|
309
|
+
cancel remote JavaScript that was already downloading. Keep
|
|
310
|
+
`reloadOnConsentRevoked` enabled so the next page starts without Appcues. A
|
|
311
|
+
new grant loads the SDK again, and repeated grants don't add another loader.
|
|
312
|
+
|
|
313
|
+
## Cookies and storage
|
|
314
|
+
|
|
315
|
+
Appcues documents
|
|
316
|
+
[local and session storage](https://docs.appcues.com/security-privacy/faq-required-cookies-local-storage-and-session-data),
|
|
317
|
+
including the localStorage keys `apc_ann_errors`, `apc_local_id`,
|
|
318
|
+
`apc_user_id` and `apc_next_content_id`. Session keys include `apc_user`,
|
|
319
|
+
`apc_debug_enabled`, `apc_debug_url`, `apc_curr_flow`, `apc_curr_checklist`,
|
|
320
|
+
`apc_cl:{id}` and `apc_followed_test_link`. The SDK can change its storage
|
|
321
|
+
across releases. Reset doesn't promise to erase every Appcues key.
|
|
322
|
+
|
|
323
|
+
## Verify Appcues
|
|
324
|
+
|
|
325
|
+
In a fresh browser profile, deny all optional consent and allow measurement
|
|
326
|
+
alone. Check that neither Appcues host is requested, `window.Appcues`,
|
|
327
|
+
`window.AppcuesSettings` and `window.AppcuesReady` are absent, and no Appcues
|
|
328
|
+
cookie, localStorage or sessionStorage key appears. Grant experience and check
|
|
329
|
+
the account loader, the runtime and `onReady`. Revoke consent while the loader
|
|
330
|
+
is still downloading and confirm that `onReady` doesn't run when that download
|
|
331
|
+
finishes. Revoke experience and confirm the page reloads and the loader stays
|
|
332
|
+
absent until a new grant.
|
|
333
|
+
|
|
334
|
+
The automated monitor uses a fake account and checks that the loader is
|
|
335
|
+
reachable. It doesn't prove that a real account's onboarding flow starts. Use
|
|
336
|
+
your own account to check flow targeting and identification.
|
|
337
|
+
|
|
338
|
+
Sources:
|
|
339
|
+
[install the Appcues SDK](https://docs.appcues.com/install-appcues-web/install-the-appcues-sdk),
|
|
340
|
+
[JavaScript API](https://docs.appcues.com/dev-api-data/javascript-api-developer)
|
|
341
|
+
and
|
|
342
|
+
[cookies, local storage and session data](https://docs.appcues.com/security-privacy/faq-required-cookies-local-storage-and-session-data).
|
|
343
|
+
|
|
344
|
+
Test in a private window with an opt-in policy. Open DevTools Network, disable
|
|
345
|
+
the cache and filter by the vendor's domain:
|
|
346
|
+
|
|
347
|
+
1. Load the page. No request goes to the vendor before you choose.
|
|
348
|
+
2. Click Reject, then reload. There is still no vendor request.
|
|
349
|
+
3. Open Privacy settings and allow the helper's category. The vendor script
|
|
350
|
+
loads without a page reload.
|
|
351
|
+
4. Turn the category off again and save. c15t reloads the page, and the new
|
|
352
|
+
page makes no vendor request.
|
|
353
|
+
|
|
354
|
+
c15t reloads on revocation because removing a script element does not stop
|
|
355
|
+
code that already ran. The vendor's listeners, timers and queued events stay
|
|
356
|
+
alive until the page unloads. If you set `reloadOnConsentRevoked: false`, stop
|
|
357
|
+
the vendor yourself. Register a callback-only script whose `onConsentChange`
|
|
358
|
+
calls the vendor's opt-out API, as shown in
|
|
359
|
+
[custom integrations](./building-integrations.md), and check the
|
|
360
|
+
permission before each of your own event calls. The reload does not delete
|
|
361
|
+
cookies the vendor already set; see
|
|
362
|
+
[clear on revocation for your framework](./overview.md#vendor-switches-and-cookie-cleanup).
|
|
363
|
+
|
|
364
|
+
The helper lists its vendor by name in the preference dialog, so a visitor can
|
|
365
|
+
turn it off inside an allowed category. See
|
|
366
|
+
[vendor consent for your framework](./overview.md#vendor-switches-and-cookie-cleanup). The
|
|
367
|
+
[consent verification guide](../guides/verify-consent.md) covers navigation,
|
|
368
|
+
expiry and hosting checks.
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Attentive
|
|
3
|
+
description: Load the Attentive tag only after marketing consent with the c15t
|
|
4
|
+
attentiveTag helper, and check its requests and storage in DevTools.
|
|
5
|
+
seoTitle: Attentive cookie consent with c15t
|
|
6
|
+
seoDescription: Keep Attentive signup units and tracking off the page until
|
|
7
|
+
marketing consent. Set your site slug and check withdrawal with c15t.
|
|
8
|
+
icon: chart-line
|
|
9
|
+
group: integrations
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Attentive shows SMS and email signup units and tracks on-site events for its
|
|
13
|
+
marketing messages. The c15t `attentiveTag` helper waits for `marketing`
|
|
14
|
+
consent before it downloads the Attentive tag. Until then, the page makes no
|
|
15
|
+
request to Attentive.
|
|
16
|
+
|
|
17
|
+
Attentive has no supported way to stop a running tag. When the visitor
|
|
18
|
+
withdraws, c15t reloads the page, and the next page doesn't load the tag.
|
|
19
|
+
|
|
20
|
+
## Configure Attentive
|
|
21
|
+
|
|
22
|
+
Find the site slug in your Attentive tag URL,
|
|
23
|
+
`https://cdn.attn.tv/<siteSlug>/dtag.js`. If you don't have it, ask your
|
|
24
|
+
Attentive contact for the slug or the full tag URL. Then remove the original
|
|
25
|
+
tag from your site, so that c15t controls when it loads.
|
|
26
|
+
|
|
27
|
+
| Package manager | Command |
|
|
28
|
+
| :-------------- | :------------------------------- |
|
|
29
|
+
| npm | `npm install @c15t/integrations` |
|
|
30
|
+
| pnpm | `pnpm add @c15t/integrations` |
|
|
31
|
+
| yarn | `yarn add @c15t/integrations` |
|
|
32
|
+
| bun | `bun add @c15t/integrations` |
|
|
33
|
+
|
|
34
|
+
```ts title="src/consent-scripts.ts"
|
|
35
|
+
import { attentiveTag } from '@c15t/integrations/attentive';
|
|
36
|
+
|
|
37
|
+
export const scripts = [attentiveTag({ siteSlug: 'YOUR_SITE' })];
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Register the scripts
|
|
41
|
+
|
|
42
|
+
Complete your [framework quickstart](https://c15t.com/docs/frameworks) first. Keep its Inth
|
|
43
|
+
endpoint, policy, styles and consent UI. Remove the vendor's original script,
|
|
44
|
+
SDK initializer or tag-manager entry, so the vendor loads only through c15t.
|
|
45
|
+
|
|
46
|
+
The vendor pages put the helper in `src/consent-scripts.ts`. If your framework
|
|
47
|
+
quickstart already has a `scripts` array, such as the one in `c15t.config.ts`
|
|
48
|
+
in the Next.js guide, add the helper to that array instead of creating a
|
|
49
|
+
second file.
|
|
50
|
+
The `scripts` export is a configuration, not an initializer. Add it to the c15t provider you already have, at the registration
|
|
51
|
+
point for your framework below. These are edits to that provider, not a second
|
|
52
|
+
provider.
|
|
53
|
+
|
|
54
|
+
**Next.js**
|
|
55
|
+
|
|
56
|
+
Add the configuration to `scripts` in `c15t.config.ts`, next to
|
|
57
|
+
`next.config.ts`:
|
|
58
|
+
|
|
59
|
+
```ts title="c15t.config.ts"
|
|
60
|
+
import { defineConsentConfig } from 'c15t/next';
|
|
61
|
+
import { scripts } from './src/consent-scripts';
|
|
62
|
+
|
|
63
|
+
export default defineConsentConfig({ scripts });
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Keep the rest of your config, such as `mode` and `routePrefix`, in the
|
|
67
|
+
same call. `ConsentRoot` reads the config in the browser, so the layout
|
|
68
|
+
keeps passing only `state`. App Router, Pages Router and static export all
|
|
69
|
+
read the same file. See
|
|
70
|
+
[Next.js scripts and embeds](https://c15t.com/docs/frameworks/next/scripts).
|
|
71
|
+
|
|
72
|
+
**TanStack Start**
|
|
73
|
+
|
|
74
|
+
Import the configuration into your root route and pass it to the existing
|
|
75
|
+
`ConsentRoot` as a top-level prop. Keep the loader from the
|
|
76
|
+
[TanStack Start quickstart](https://c15t.com/docs/frameworks/tanstack-start/quickstart):
|
|
77
|
+
|
|
78
|
+
```tsx title="src/routes/__root.tsx"
|
|
79
|
+
import { scripts } from '../consent-scripts';
|
|
80
|
+
|
|
81
|
+
<ConsentRoot state={consent} scripts={scripts}>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Import vendor helpers in the root route module, not in a server function.
|
|
85
|
+
A server function's return value must be serializable, and script
|
|
86
|
+
configurations carry callbacks. See
|
|
87
|
+
[TanStack Start scripts](https://c15t.com/docs/frameworks/tanstack-start/scripts).
|
|
88
|
+
|
|
89
|
+
**React**
|
|
90
|
+
|
|
91
|
+
Add the configuration to the existing `ConsentProvider` options, next to
|
|
92
|
+
`mode`:
|
|
93
|
+
|
|
94
|
+
```tsx title="src/consent.tsx"
|
|
95
|
+
import { scripts } from './consent-scripts';
|
|
96
|
+
|
|
97
|
+
<ConsentProvider options={{ mode, scripts }}>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
`mode` is the `manifest()` value from the
|
|
101
|
+
[React quickstart](../frameworks/react/quickstart.md). Keep the banner,
|
|
102
|
+
dialog and preferences link inside the provider. See
|
|
103
|
+
[React scripts and embeds](../frameworks/react/scripts.md).
|
|
104
|
+
|
|
105
|
+
**Nuxt**
|
|
106
|
+
|
|
107
|
+
Register the scripts under the `c15t` key in `app/app.config.ts`. Adjust the
|
|
108
|
+
relative import to where you created `consent-scripts.ts`:
|
|
109
|
+
|
|
110
|
+
```ts title="app/app.config.ts"
|
|
111
|
+
import { scripts } from '../src/consent-scripts';
|
|
112
|
+
|
|
113
|
+
export default defineAppConfig({
|
|
114
|
+
c15t: { scripts },
|
|
115
|
+
});
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
The Nuxt module merges this over its options in `nuxt.config.ts` and starts
|
|
119
|
+
one script loader in the browser after hydration, once it has applied the
|
|
120
|
+
visitor's stored choice and privacy signals. Keep `scripts` out of
|
|
121
|
+
`nuxt.config.ts`, which reaches the browser as JSON and drops the vendor
|
|
122
|
+
callbacks. Write the vendor IDs into `consent-scripts.ts`. See
|
|
123
|
+
[Nuxt scripts and embeds](https://c15t.com/docs/frameworks/nuxt/scripts).
|
|
124
|
+
|
|
125
|
+
**Vue**
|
|
126
|
+
|
|
127
|
+
Pass the scripts to the existing `c15tVue` plugin call in `src/main.ts`:
|
|
128
|
+
|
|
129
|
+
```ts title="src/main.ts"
|
|
130
|
+
import { c15tVue, manifest } from 'c15t/vue/vue-plugin';
|
|
131
|
+
import { scripts } from './consent-scripts';
|
|
132
|
+
|
|
133
|
+
app.use(c15tVue, {
|
|
134
|
+
mode: manifest(),
|
|
135
|
+
scripts,
|
|
136
|
+
});
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Keep your existing `mode` and other options. The plugin starts one
|
|
140
|
+
script loader when the app mounts, after it has applied the visitor's stored
|
|
141
|
+
choice. Do not also call `createScriptLoader` from a component. See
|
|
142
|
+
[Vue scripts and embeds](https://c15t.com/docs/frameworks/vue/scripts).
|
|
143
|
+
|
|
144
|
+
**Astro**
|
|
145
|
+
|
|
146
|
+
Add the scripts to the client entrypoint from the
|
|
147
|
+
[Astro quickstart](https://c15t.com/docs/frameworks/astro/quickstart), `src/c15t.client.ts`,
|
|
148
|
+
which the integration finds on its own. Keep `astro.config.mjs` as it is.
|
|
149
|
+
If the module already exports scripts, combine the two arrays.
|
|
150
|
+
|
|
151
|
+
```ts title="src/c15t.client.ts"
|
|
152
|
+
import type { C15tClientOptionsExtension } from 'c15t/astro';
|
|
153
|
+
import { scripts } from './consent-scripts';
|
|
154
|
+
|
|
155
|
+
export default { scripts } satisfies C15tClientOptionsExtension;
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Vendor helpers contain callbacks, and the integration options in
|
|
159
|
+
`astro.config.mjs` are serialized into the page, so do not put helpers in
|
|
160
|
+
the integration's `scripts` option. The integration passes the client
|
|
161
|
+
entrypoint to the one runtime every page shares, including across
|
|
162
|
+
`ClientRouter` navigation.
|
|
163
|
+
|
|
164
|
+
**Svelte**
|
|
165
|
+
|
|
166
|
+
Import the scripts in the component that owns your existing provider and
|
|
167
|
+
pass them as a top-level prop:
|
|
168
|
+
|
|
169
|
+
```svelte title="src/App.svelte"
|
|
170
|
+
<script lang="ts">
|
|
171
|
+
import { ConsentProvider, manifest } from 'c15t/svelte';
|
|
172
|
+
import { scripts } from './consent-scripts';
|
|
173
|
+
</script>
|
|
174
|
+
|
|
175
|
+
<ConsentProvider mode={manifest()} {scripts}>
|
|
176
|
+
<!-- Keep your application, consent UI and preferences link here. -->
|
|
177
|
+
</ConsentProvider>
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Retain the styles and consent UI from the [Svelte quickstart](https://c15t.com/docs/frameworks/svelte/quickstart).
|
|
181
|
+
The provider owns the loader and disposes it on unmount.
|
|
182
|
+
|
|
183
|
+
**SvelteKit**
|
|
184
|
+
|
|
185
|
+
Add the scripts to the existing `ConsentRoot` in the root layout. Keep the
|
|
186
|
+
handle and the layout load from the [SvelteKit quickstart](https://c15t.com/docs/frameworks/sveltekit/quickstart).
|
|
187
|
+
|
|
188
|
+
```svelte title="src/routes/+layout.svelte"
|
|
189
|
+
<script lang="ts">
|
|
190
|
+
import { ConsentRoot } from 'c15t/svelte';
|
|
191
|
+
import { scripts } from '../consent-scripts';
|
|
192
|
+
|
|
193
|
+
let { children, data } = $props();
|
|
194
|
+
</script>
|
|
195
|
+
|
|
196
|
+
<ConsentRoot state={data.consent} {scripts}>
|
|
197
|
+
{@render children()}
|
|
198
|
+
<!-- Keep your consent UI and preferences link here. -->
|
|
199
|
+
</ConsentRoot>
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Import vendor helpers in the layout component, not in `+layout.server.ts`:
|
|
203
|
+
a server load cannot send functions to the browser. Prerendered, static and
|
|
204
|
+
SPA-mode pages use the same `scripts` prop. If you pass an externally owned
|
|
205
|
+
`runtime` to the provider, register scripts when creating that runtime instead.
|
|
206
|
+
|
|
207
|
+
**HTML**
|
|
208
|
+
|
|
209
|
+
The helpers in `@c15t/integrations` are ES modules that need a bundler. On a
|
|
210
|
+
page that loads the c15t script tag, paste the vendor's own snippet instead
|
|
211
|
+
and keep it inert until its category is allowed:
|
|
212
|
+
|
|
213
|
+
```html
|
|
214
|
+
<script type="text/plain" data-c15t-category="measurement">
|
|
215
|
+
// The vendor's snippet, unchanged
|
|
216
|
+
</script>
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Use the category this guide names for the vendor. c15t runs the snippet
|
|
220
|
+
once that category is allowed, and reloads the page when the visitor
|
|
221
|
+
withdraws it. Helper options on this page, such as `loadMode`, do not apply
|
|
222
|
+
to a pasted snippet. See [HTML scripts](https://c15t.com/docs/frameworks/html/scripts).
|
|
223
|
+
|
|
224
|
+
**JavaScript**
|
|
225
|
+
|
|
226
|
+
Pass the scripts to `init()` from `@c15t/browser`, next to your mode:
|
|
227
|
+
|
|
228
|
+
```ts
|
|
229
|
+
import { init, manifest } from '@c15t/browser';
|
|
230
|
+
import { scripts } from './consent-scripts';
|
|
231
|
+
|
|
232
|
+
const consent = init({
|
|
233
|
+
mode: manifest(),
|
|
234
|
+
scripts,
|
|
235
|
+
});
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Keep the mode from your quickstart. With
|
|
239
|
+
`createConsentRuntime` from `c15t/runtime`, pass `scripts` to it instead.
|
|
240
|
+
A kernel you create yourself needs a loader from
|
|
241
|
+
`c15t/modules/script-loader`. Attach one loader per kernel. See
|
|
242
|
+
[JavaScript scripts](https://c15t.com/docs/frameworks/javascript/scripts).
|
|
243
|
+
|
|
244
|
+
## Options
|
|
245
|
+
|
|
246
|
+
| Option | Default | Behavior |
|
|
247
|
+
| ----------- | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
248
|
+
| `siteSlug` | Required | Site slug from the tag URL. Whitespace is trimmed. It can contain only ASCII letters, digits, `_` and `-`. A URL, a path, or a missing or blank value logs an error and never loads the tag, even when you set `scriptUrl`. |
|
|
249
|
+
| `category` | `marketing` | Consent condition for the whole loader. |
|
|
250
|
+
| `scriptUrl` | `https://cdn.attn.tv/<siteSlug>/dtag.js` | Exact tag URL from Attentive or your proxy. Blank values use the default. |
|
|
251
|
+
|
|
252
|
+
## Loading and revocation
|
|
253
|
+
|
|
254
|
+
After consent, the helper adds `dtag.js` at the end of the body. It creates no
|
|
255
|
+
queue or globals of its own. Attentive can then download more bundles, create
|
|
256
|
+
an iframe, show signup units and track events.
|
|
257
|
+
|
|
258
|
+
On withdrawal, the tag element stays on the page. If the visitor allows
|
|
259
|
+
marketing again on the same page, the helper reuses that tag instead of
|
|
260
|
+
adding a second one.
|
|
261
|
+
|
|
262
|
+
Keep `reloadOnConsentRevoked` enabled. Attentive has no documented client API
|
|
263
|
+
that reliably stops all tag behavior. Removing the tag can't unload code that
|
|
264
|
+
already ran, cancel pending requests or remove every iframe. The helper
|
|
265
|
+
doesn't use Attentive's undocumented enable and disable methods. The next page
|
|
266
|
+
doesn't load the tag while marketing is denied.
|
|
267
|
+
|
|
268
|
+
## Cookies and storage
|
|
269
|
+
|
|
270
|
+
Attentive can set `_attn_`, `__attentive_id`, `__attentive_dv`,
|
|
271
|
+
`__attentive_ss_referrer`, `__attentive_pv`, `__attentive_cco`,
|
|
272
|
+
`attntv_mstore_email`, `attntv_mstore_phone`, `__attentive_ceid`,
|
|
273
|
+
`__attentive_domain` and `__attentive_client_user_id`. Some identifiers, such
|
|
274
|
+
as `__attentive_id`, last up to 390 days. The reload doesn't delete them.
|
|
275
|
+
Check cookies and both browser storage areas for your tag configuration.
|
|
276
|
+
|
|
277
|
+
## Verify Attentive
|
|
278
|
+
|
|
279
|
+
Filter the Network panel by `attn.tv`. Before consent, and after you allow an
|
|
280
|
+
unrelated category, check that there is no `dtag.js` request, no Attentive
|
|
281
|
+
global or iframe, and no Attentive cookies or browser storage. Allow marketing
|
|
282
|
+
and inspect the tag and the bundles it loads. Withdraw marketing and confirm
|
|
283
|
+
that the reloaded page doesn't load them. Test signup units and message
|
|
284
|
+
delivery only with your own Attentive account.
|
|
285
|
+
|
|
286
|
+
Sources: Attentive's [tag setup](https://help.attentive.com/hc/en-us/articles/10905920909460-The-Attentive-tag)
|
|
287
|
+
and [cookie list](https://help.attentive.com/hc/en-us/articles/14615673918484-Attentive-cookies).
|
|
288
|
+
|
|
289
|
+
Test in a private window with an opt-in policy. Open DevTools Network, disable
|
|
290
|
+
the cache and filter by the vendor's domain:
|
|
291
|
+
|
|
292
|
+
1. Load the page. No request goes to the vendor before you choose.
|
|
293
|
+
2. Click Reject, then reload. There is still no vendor request.
|
|
294
|
+
3. Open Privacy settings and allow the helper's category. The vendor script
|
|
295
|
+
loads without a page reload.
|
|
296
|
+
4. Turn the category off again and save. c15t reloads the page, and the new
|
|
297
|
+
page makes no vendor request.
|
|
298
|
+
|
|
299
|
+
c15t reloads on revocation because removing a script element does not stop
|
|
300
|
+
code that already ran. The vendor's listeners, timers and queued events stay
|
|
301
|
+
alive until the page unloads. If you set `reloadOnConsentRevoked: false`, stop
|
|
302
|
+
the vendor yourself. Register a callback-only script whose `onConsentChange`
|
|
303
|
+
calls the vendor's opt-out API, as shown in
|
|
304
|
+
[custom integrations](./building-integrations.md), and check the
|
|
305
|
+
permission before each of your own event calls. The reload does not delete
|
|
306
|
+
cookies the vendor already set; see
|
|
307
|
+
[clear on revocation for your framework](./overview.md#vendor-switches-and-cookie-cleanup).
|
|
308
|
+
|
|
309
|
+
The helper lists its vendor by name in the preference dialog, so a visitor can
|
|
310
|
+
turn it off inside an allowed category. See
|
|
311
|
+
[vendor consent for your framework](./overview.md#vendor-switches-and-cookie-cleanup). The
|
|
312
|
+
[consent verification guide](../guides/verify-consent.md) covers navigation,
|
|
313
|
+
expiry and hosting checks.
|