@picked/client 0.0.1-dev.1787543060859 → 0.0.1-dev.1787788898336
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/dist/.tsbuildinfo +1 -1
- package/dist/api-9gq3GBPF.cjs +1 -0
- package/dist/api-DU4j3Qw0.js +22 -0
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/responses-indexeddb/index.js +1 -1
- package/dist/cjs/plugins/telemetry/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/docs/how-to/fill-and-publish-a-page.md +18 -2
- package/dist/docs/reference/dashboard/content/pages.mdx +25 -0
- package/dist/docs/reference/delivery-api/preview-caching-crawling.md +1 -1
- package/dist/docs/reference/sdk/fields.md +30 -16
- package/dist/esm/index.js +163 -152
- package/dist/esm/plugins/dynamic-experiences/index.js +2 -2
- package/dist/esm/plugins/responses-browser-storage/index.js +2 -2
- package/dist/esm/plugins/responses-indexeddb/index.js +1 -1
- package/dist/esm/plugins/telemetry/index.js +42 -46
- package/dist/esm/server/index.js +1 -1
- package/dist/{plugin-L5y4NdFX.js → plugin-CYXHEafF.js} +2 -2
- package/dist/{plugin-BcFzHPC7.cjs → plugin-rwzR9hVc.cjs} +1 -1
- package/dist/provider-BWDd3oaq.js +94 -0
- package/dist/provider-lgLyP_0N.cjs +1 -0
- package/dist/types/data-source/api.d.ts.map +1 -1
- package/dist/types/data-source/provider.d.ts +3 -0
- package/dist/types/data-source/provider.d.ts.map +1 -1
- package/dist/types/data-source/request-observer.d.ts +24 -12
- package/dist/types/data-source/request-observer.d.ts.map +1 -1
- package/dist/types/entities/field/field.d.ts +6 -0
- package/dist/types/entities/field/field.d.ts.map +1 -1
- package/dist/types/entities/plugin/plugin.d.ts +3 -3
- package/dist/types/lifecycle/lifecycle.d.ts.map +1 -1
- package/dist/types/picked.d.ts +14 -7
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/responses-indexeddb/plugin.d.ts.map +1 -1
- package/dist/types/plugins/telemetry/emit.d.ts +3 -3
- package/dist/types/plugins/telemetry/emit.d.ts.map +1 -1
- package/dist/types/plugins/telemetry/plugin.d.ts +9 -0
- package/dist/types/plugins/telemetry/plugin.d.ts.map +1 -1
- package/dist/types/utils/user-timing.d.ts +16 -13
- package/dist/types/utils/user-timing.d.ts.map +1 -1
- package/dist/{version-BqU6f22c.cjs → version-BaI_1eQx.cjs} +1 -1
- package/dist/{version-DAFO6eas.js → version-DXDZM7eT.js} +1 -1
- package/package.json +3 -3
- package/dist/api-CahTmEWe.cjs +0 -1
- package/dist/api-DwTNwuWK.js +0 -33
- package/dist/provider-BLDm3i8g.cjs +0 -1
- package/dist/provider-Dx6VjvZg.js +0 -69
- package/dist/request-observer-BXDfOU0V.cjs +0 -1
- package/dist/request-observer-DtG0cRfz.js +0 -19
|
@@ -124,36 +124,50 @@ const conditionalField = createField({
|
|
|
124
124
|
|
|
125
125
|
## Field policies
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
A field captures nothing until you permit it. Use a privacy policy to let Picked track
|
|
128
|
+
or store the data of a field:
|
|
128
129
|
|
|
129
130
|
```ts
|
|
130
|
-
const
|
|
131
|
-
id: '
|
|
132
|
-
name: '
|
|
131
|
+
const colourField = createField({
|
|
132
|
+
id: 'favourite-colour',
|
|
133
|
+
name: 'favourite-colour',
|
|
133
134
|
type: 'text',
|
|
134
|
-
label: '
|
|
135
|
+
label: 'Favourite colour',
|
|
135
136
|
multiple: false,
|
|
136
137
|
required: true,
|
|
137
138
|
policies: {
|
|
138
|
-
doNotTrackValue:
|
|
139
|
-
doNotStoreValue:
|
|
139
|
+
doNotTrackValue: false, // Send the value to analytics.
|
|
140
|
+
doNotStoreValue: false, // Keep the value in browser storage.
|
|
140
141
|
},
|
|
141
142
|
})
|
|
142
143
|
```
|
|
143
144
|
|
|
144
145
|
**Privacy policies**:
|
|
145
146
|
|
|
146
|
-
- `doNotTrackValue`:
|
|
147
|
-
events carry the field ID only.
|
|
148
|
-
- `doNotStoreValue`:
|
|
149
|
-
storage.
|
|
147
|
+
- `doNotTrackValue`: set it to `false` to put the value of the field in your analytics
|
|
148
|
+
events. At `true`, and when the policy is absent, the events carry the field ID only.
|
|
149
|
+
- `doNotStoreValue`: set it to `false` to let the SDK put the value in browser storage.
|
|
150
|
+
At `true`, and when the policy is absent, the SDK keeps the value out of storage.
|
|
150
151
|
|
|
151
|
-
|
|
152
|
-
|
|
152
|
+
Both policies keep the value in the browser by default. A field with no `policies`
|
|
153
|
+
object sends no value to your analytics and writes no value to browser storage. Keep
|
|
154
|
+
the default for sensitive data such as a tax number, a credit card number, or a
|
|
155
|
+
password. That data stays in the browser:
|
|
156
|
+
|
|
157
|
+
```ts
|
|
158
|
+
const sensitiveField = createField({
|
|
159
|
+
id: 'ssn',
|
|
160
|
+
name: 'ssn',
|
|
161
|
+
type: 'text',
|
|
162
|
+
label: 'Social Security Number',
|
|
163
|
+
multiple: false,
|
|
164
|
+
required: true,
|
|
165
|
+
})
|
|
166
|
+
```
|
|
153
167
|
|
|
154
|
-
Neither policy stops the flow from the use of the value inside the page. A field
|
|
155
|
-
|
|
156
|
-
the step. The policies control what leaves the page: your analytics, and browser
|
|
168
|
+
Neither policy stops the flow from the use of the value inside the page. A field that
|
|
169
|
+
captures nothing still holds its value there, for step validation and for the conditions
|
|
170
|
+
after the step. The policies control what leaves the page: your analytics, and browser
|
|
157
171
|
storage.
|
|
158
172
|
|
|
159
173
|
## Field metadata
|