Skip to content

Commit 7b35e2f

Browse files
bkboothclaude
andcommitted
docs(audience): promote testMode note to its own section in READMEs
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent f094f65 commit 7b35e2f

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

packages/audience/pixel/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,17 @@ Note: the nonce covers the inline snippet only. The CDN-loaded script (`imtbl.js
152152
| Safari | 14+ |
153153
| Edge | 80+ |
154154

155-
Pass `"testMode": true` in the init options to mark all events with `test: true`, which lets you filter test traffic from production analytics.
155+
## Test mode
156+
157+
Set `"testMode": true` in the init options to mark every event with a
158+
top-level `test: true` flag. Useful for development, staging, or QA —
159+
events still flow through the production endpoint, but can be filtered
160+
out of production analytics downstream.
161+
162+
```diff
163+
- w[i].push(["init",{"key":"YOUR_KEY","consent":"anonymous"}]);
164+
+ w[i].push(["init",{"key":"YOUR_KEY","consent":"anonymous","testMode":true}]);
165+
```
156166

157167
## Documentation
158168

packages/audience/sdk/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,19 @@ audience.shutdown();
6161
</script>
6262
```
6363

64-
Pass `testMode: true` in the config to mark all events with `test: true`, which lets you filter test traffic from production analytics.
64+
## Test mode
65+
66+
Pass `testMode: true` in the config to mark every event with a top-level
67+
`test: true` flag. Useful for development, staging, or QA — events still
68+
flow through the production endpoint, but can be filtered out of
69+
production analytics downstream.
70+
71+
```ts
72+
Audience.init({
73+
publishableKey: 'YOUR_PUBLISHABLE_KEY',
74+
testMode: true,
75+
});
76+
```
6577

6678
## Documentation
6779

0 commit comments

Comments
 (0)