@c15t/react 3.2.0-canary.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.
Files changed (48) hide show
  1. package/AGENTS.md +30 -7
  2. package/dist/styles.tw3.css +2 -2
  3. package/dist/version.js +1 -1
  4. package/dist-types/version.d.ts +1 -1
  5. package/docs/README.md +30 -7
  6. package/docs/concepts/modes.md +5 -3
  7. package/docs/customization/stylesheets.md +39 -0
  8. package/docs/frameworks/react/hooks.md +2 -1
  9. package/docs/frameworks/react/quickstart.md +1 -1
  10. package/docs/frameworks/react/upgrade-v3.md +2 -2
  11. package/docs/integrations/activecampaign.md +297 -0
  12. package/docs/integrations/ada.md +396 -0
  13. package/docs/integrations/adobe-target.md +460 -0
  14. package/docs/integrations/adroll.md +336 -0
  15. package/docs/integrations/amazon-ads.md +424 -0
  16. package/docs/integrations/appcues.md +368 -0
  17. package/docs/integrations/attentive.md +313 -0
  18. package/docs/integrations/building-integrations.md +29 -16
  19. package/docs/integrations/clearbit.md +1 -1
  20. package/docs/integrations/customer-io.md +369 -0
  21. package/docs/integrations/databuddy.md +125 -50
  22. package/docs/integrations/default-com.md +497 -0
  23. package/docs/integrations/dynamic-yield.md +373 -0
  24. package/docs/integrations/fullstory.md +298 -0
  25. package/docs/integrations/gainsight-px.md +418 -0
  26. package/docs/integrations/gorgias.md +365 -0
  27. package/docs/integrations/hubspot.md +529 -0
  28. package/docs/integrations/insider.md +550 -0
  29. package/docs/integrations/liveintent.md +327 -0
  30. package/docs/integrations/lucky-orange.md +336 -0
  31. package/docs/integrations/marketo.md +309 -0
  32. package/docs/integrations/optimizely.md +411 -0
  33. package/docs/integrations/oracle-eloqua.md +301 -0
  34. package/docs/integrations/overview.md +124 -111
  35. package/docs/integrations/pendo.md +339 -0
  36. package/docs/integrations/rb2b.md +363 -0
  37. package/docs/integrations/salesforce-pardot.md +342 -0
  38. package/docs/integrations/statable-analytics.md +345 -0
  39. package/docs/integrations/the-trade-desk.md +328 -0
  40. package/docs/integrations/vector.md +333 -0
  41. package/docs/integrations/wisepops.md +416 -0
  42. package/docs/integrations/zendesk.md +359 -0
  43. package/package.json +8 -8
  44. package/docs/integrations/other-ads-and-pixels.md +0 -94
  45. package/docs/integrations/other-analytics.md +0 -108
  46. package/docs/integrations/other-chat-and-support.md +0 -112
  47. package/docs/integrations/other-email-and-sms.md +0 -156
  48. package/docs/integrations/other-experience.md +0 -222
@@ -1,30 +1,29 @@
1
1
  ---
2
2
  title: Databuddy
3
- description: Load the Databuddy SDK on every page with the c15t databuddy
4
- helper, switch its disabled flag and config from measurement consent, and
5
- check both in DevTools.
3
+ description: Load Databuddy only after measurement consent with the c15t
4
+ databuddy helper, turn off tracking features you do not use, record sessions
5
+ with the replay option, and check revocation in DevTools.
6
6
  seoTitle: Databuddy cookie consent with c15t
7
- seoDescription: Keep Databuddy disabled without measurement consent, and turn it
8
- on with consent. Set it up with the c15t databuddy helper.
7
+ seoDescription: Load Databuddy and its session replay only with measurement
8
+ consent, and stop both when consent is withdrawn. Set it up with the c15t
9
+ databuddy helper.
9
10
  icon: databuddy
10
11
  group: integrations
11
12
  ---
12
13
 
13
- The c15t `databuddy` helper loads `databuddy.js` on every page, before the
14
- visitor chooses. The helper uses `alwaysLoad`, but its category is
15
- `measurement`. While `measurement` has no consent, the helper sets
16
- `window.databuddy.options.disabled` to `true`. It also sets
17
- `window.databuddyConfig` to `configWhenDenied`, unless your page set
18
- `window.databuddyConfig` first. When `measurement` has consent, the helper
19
- changes to `configWhenGranted` and sets `disabled` to `false`. If the visitor
20
- withdraws consent, the helper changes both values back.
14
+ The c15t `databuddy` helper waits for `measurement` consent before it loads
15
+ `databuddy.js`. Before the visitor allows measurement, the page sends no
16
+ request to Databuddy and Databuddy stores nothing. If the visitor withdraws
17
+ consent, the helper disables the Databuddy tracker and stops session replay,
18
+ and c15t reloads the page.
21
19
 
22
20
  ## Configure Databuddy
23
21
 
24
22
  Copy the client ID from your Databuddy project. The helper passes it to the
25
- script as `data-client-id`. Remove any existing Databuddy script and any code
26
- that sets `window.databuddyConfig`. The helper seeds that global only when it
27
- is absent, so an existing value overrides your initial state.
23
+ script as `data-client-id`. Remove any existing Databuddy or `replay.js` script
24
+ tag, any `<Databuddy />` component from `@databuddy/sdk`, and any code that
25
+ sets `window.databuddyConfig`. The helper seeds that global only when it is absent,
26
+ so an existing value overrides it.
28
27
 
29
28
  | Package manager | Command |
30
29
  | :-------------- | :------------------------------- |
@@ -37,11 +36,7 @@ is absent, so an existing value overrides your initial state.
37
36
  import { databuddy } from '@c15t/integrations/databuddy';
38
37
 
39
38
  export const scripts = [
40
- databuddy({
41
- clientId: 'YOUR_CLIENT_ID',
42
- configWhenGranted: { disabled: false },
43
- configWhenDenied: { disabled: true },
44
- }),
39
+ databuddy({ clientId: 'YOUR_CLIENT_ID', features: { interactions: false } }),
45
40
  ];
46
41
  ```
47
42
 
@@ -251,43 +246,123 @@ A kernel you create yourself needs a loader from
251
246
 
252
247
  ## Options
253
248
 
254
- | Option | Default | Behavior |
255
- | ------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
256
- | `clientId` | Required | Set as `data-client-id`. The helper trims it. Empty or whitespace-only values log an error and the script does not load. |
257
- | `configWhenGranted` | Required | Object set as `window.databuddyConfig` while measurement is allowed. |
258
- | `configWhenDenied` | Required | Object set as `window.databuddyConfig` while measurement is denied. |
259
- | `apiUrl` | `https://basket.databuddy.cc` | Collection endpoint, set as `data-api-url`. |
260
- | `scriptUrl` | `https://cdn.databuddy.cc/databuddy.js` | Loader URL override. A blank value falls back to the default. |
249
+ | Option | Default | Behavior |
250
+ | ------------------------ | --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
251
+ | `clientId` | Required | Set as `data-client-id`. The helper trims it. Empty or whitespace-only values log an error and the script does not load. |
252
+ | `loadMode` | `'after-consent'` | When the script loads. See [loading and revocation](#loading-and-revocation). |
253
+ | `features.interactions` | Unset, Databuddy turns it on | Sets `data-track-interactions`. |
254
+ | `features.webVitals` | Unset, Databuddy turns it off | Sets `data-track-web-vitals`. |
255
+ | `features.errors` | Unset, Databuddy turns it off | Sets `data-track-errors`. |
256
+ | `features.outgoingLinks` | Unset, Databuddy turns it off | Sets `data-track-outgoing-links`. |
257
+ | `replay` | `false` | `true` or an object loads `replay.js` while measurement is allowed. See [record sessions](#record-sessions). |
258
+ | `replay.maskText` | Unset, Databuddy masks text | Sets `data-mask-text` on `replay.js`. `false` records page text. |
259
+ | `replay.recordIframes` | Unset, Databuddy turns it off | Sets `data-record-iframes` on `replay.js`. |
260
+ | `replay.scriptUrl` | `https://cdn.databuddy.cc/replay.js` | Replay script URL override. A blank value falls back to the default. |
261
+ | `configWhenGranted` | `{ apiUrl, clientId, disabled: false }` | Object set as `window.databuddyConfig` before the script loads with measurement allowed, and on each grant. c15t sets its `disabled` key from consent. |
262
+ | `configWhenDenied` | `{ apiUrl, clientId, disabled: true }` | With `loadMode: 'always'` only. Object set as `window.databuddyConfig` before the script loads without measurement permission, and on each refusal. c15t sets its `disabled` key from consent. |
263
+ | `apiUrl` | `https://basket.databuddy.cc` | Collection endpoint, set as `data-api-url`. |
264
+ | `scriptUrl` | `https://cdn.databuddy.cc/databuddy.js` | Loader URL override. A blank value falls back to the default. |
265
+
266
+ ## Turn off features you do not use
267
+
268
+ Databuddy collects some data unless the site turns it off. Set a `features`
269
+ switch to `false` to stop that collection, or to `true` to turn on a feature
270
+ Databuddy leaves off:
271
+
272
+ ```ts
273
+ databuddy({
274
+ clientId: 'YOUR_CLIENT_ID',
275
+ features: {
276
+ interactions: false,
277
+ webVitals: false,
278
+ errors: false,
279
+ outgoingLinks: false,
280
+ },
281
+ });
282
+ ```
283
+
284
+ | Switch | Databuddy default | What Databuddy collects |
285
+ | --------------- | ----------------- | -------------------------------------------- |
286
+ | `interactions` | On | Rage clicks, dead clicks and abandoned forms |
287
+ | `webVitals` | Off | FCP, LCP, INP, CLS, TTFB and FPS |
288
+ | `errors` | Off | JavaScript errors, with message and stack |
289
+ | `outgoingLinks` | Off | Clicks on links to other sites |
290
+
291
+ Each switch sets a `data-track-*` attribute on the script. An unset switch
292
+ sets no attribute, so Databuddy keeps its own default. Databuddy reads `data-*`
293
+ attributes after `window.databuddyConfig`, so a switch wins over the same key
294
+ in `configWhenGranted` or `configWhenDenied`.
261
295
 
262
296
  ## Loading and revocation
263
297
 
264
- `databuddy` uses the `measurement` category with `alwaysLoad`, so the
265
- Databuddy script loads on every page, before the visitor chooses. Before the
266
- script loads, the helper sets `window.databuddyConfig` to `configWhenDenied` or
267
- `configWhenGranted`, unless that global already exists. After the script
268
- loads, the helper sets `window.databuddy.options.disabled` to `true` without
269
- measurement permission and to `false` with it. On each later consent change,
270
- the helper replaces `window.databuddyConfig` with the matching object and
271
- updates `disabled` again. c15t never removes the script.
298
+ | `loadMode` | When `databuddy.js` loads | Before the visitor allows measurement |
299
+ | ----------------- | --------------------------------- | -------------------------------------------------------------------------- |
300
+ | `'after-consent'` | Only while measurement is allowed | No request to Databuddy and no storage |
301
+ | `'always'` | On every page, before consent | The script loads and stores a visitor ID while `disabled` stops it sending |
302
+
303
+ On revocation, the helper sets `window.databuddy.options.disabled` to `true`,
304
+ which stops the main tracker sending. It also sets `disabled: true` in
305
+ `window.databuddyConfig`, or replaces the object with `configWhenDenied` in
306
+ `'always'` mode. A `databuddy.js` download that finishes after the refusal then
307
+ starts disabled. With [`replay`](#record-sessions) on, the helper also stops
308
+ the recorder. c15t then reloads the page, which is the default
309
+ `reloadOnConsentRevoked` behavior. On a later grant, c15t sets both back to
310
+ `false`, and `window.databuddyConfig` to `configWhenGranted`.
311
+
312
+ With `loadMode: 'always'`, `databuddy.js` runs before the visitor chooses. It
313
+ stores its visitor ID in localStorage even while `disabled` is `true`.
314
+ Databuddy's own consent guidance is to delay loading until consent where prior
315
+ consent is required. Use `'always'` only where your policy allows that.
316
+
317
+ ## Record sessions
318
+
319
+ Databuddy records sessions with a separate script, `replay.js`. Set `replay`
320
+ to have the helper load it:
321
+
322
+ ```ts
323
+ databuddy({ clientId: 'YOUR_CLIENT_ID', replay: true });
324
+ ```
272
325
 
273
- The Databuddy SDK decides what `disabled` stops. The helper cannot prevent the
274
- script request before consent. If Databuddy must receive no request before
275
- consent, write a
276
- [custom gated integration](./building-integrations.md) instead.
326
+ `replay: true` keeps Databuddy's replay defaults, which mask page text and
327
+ typed input. The helper adds `replay.js` only while measurement is allowed,
328
+ including with `loadMode: 'always'`, and passes it the same `clientId` and
329
+ `apiUrl` as `databuddy.js`. `replay.js` does not read Databuddy's `disabled`
330
+ flag, so the helper calls `window.databuddyReplay.stop()` and removes the
331
+ script on revocation. It does the same when you turn `replay` off, remove the
332
+ helper or dispose the script loader. Recording stops without waiting for the
333
+ page reload. A later grant loads `replay.js` again.
334
+
335
+ `replay: { maskText: false }` records page text; typed input stays masked. Use
336
+ it only when your pages show no personal data, such as names, email addresses
337
+ or order details. Recordings would otherwise include that data. To change
338
+ masking for one element, add an attribute to it in your markup:
339
+
340
+ * `data-replay-unmask` records the text of an element that is safe to show.
341
+ * `data-replay-block` leaves the element out. The recording shows an empty box
342
+ of the same size.
343
+
344
+ `recordIframes: true` records your own embedded pages into the parent page's
345
+ recording. Set it on the framed page too. See
346
+ [Databuddy's session replay guide](https://www.databuddy.cc/docs/session-replay)
347
+ for its limits and the dashboard setting that turns replay off.
348
+
349
+ Do not also add `replay.js` to the page as a plain `<script>` tag. Outside
350
+ c15t, it starts recording on the visitor's first click, scroll or key press,
351
+ and uploads that recording even if the visitor has not chosen.
277
352
 
278
353
  ## Verify Databuddy
279
354
 
280
- 1. In a private window with an opt-in policy, load the page. `databuddy.js`
281
- loads from `cdn.databuddy.cc` with your `data-client-id`. In the console,
282
- `window.databuddyConfig` matches `configWhenDenied` and
283
- `window.databuddy.options.disabled` is `true`.
284
- 2. Click Reject, then reload. `disabled` is still `true`, and DevTools Network
285
- shows no event request to your `apiUrl`.
286
- 3. Open Privacy settings and allow measurement. Without a reload, `disabled`
287
- becomes `false`, `window.databuddyConfig` matches `configWhenGranted`, and
288
- event requests reach your `apiUrl`.
355
+ 1. In a private window with an opt-in policy, load the page. DevTools Network
356
+ shows no request to `cdn.databuddy.cc` or `basket.databuddy.cc`, and
357
+ Application shows no `did` key in localStorage.
358
+ 2. Click Reject, then reload. There are still no Databuddy requests.
359
+ 3. Open Privacy settings and allow measurement. Without a reload,
360
+ `databuddy.js` loads from `cdn.databuddy.cc` with your `data-client-id`, and
361
+ requests reach your `apiUrl`. With `replay` on, `replay.js` loads too. Move
362
+ the pointer or scroll, and a `POST` to `/replay` follows within a few
363
+ seconds.
289
364
  4. Turn measurement off again and save. c15t reloads the page, and the new
290
- page starts with `disabled` set to `true`.
365
+ page sends no request to `cdn.databuddy.cc` or `basket.databuddy.cc`.
291
366
 
292
367
  See the [consent verification guide](../guides/verify-consent.md) for
293
368
  navigation and hosting checks.