@walkeros/web-destination-pinterest 3.4.2 → 4.0.0-next-1777463920154
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/README.md +16 -16
- package/dist/dev.d.mts +11 -11
- package/dist/dev.d.ts +11 -11
- package/dist/dev.js +1 -1
- package/dist/dev.js.map +1 -1
- package/dist/dev.mjs +1 -1
- package/dist/dev.mjs.map +1 -1
- package/dist/examples/index.d.mts +11 -11
- package/dist/examples/index.d.ts +11 -11
- package/dist/examples/index.js +31 -26
- package/dist/examples/index.mjs +31 -26
- package/dist/index.browser.js +1 -1
- package/dist/index.es5.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/walkerOS.json +23 -128
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -17,19 +17,19 @@ tracking, enhanced matching, and dynamic retargeting.
|
|
|
17
17
|
|
|
18
18
|
## Features
|
|
19
19
|
|
|
20
|
-
- **Standard event taxonomy**
|
|
20
|
+
- **Standard event taxonomy** - explicit `mapping.name` rename to Pinterest's
|
|
21
21
|
lowercase concatenated names (`pagevisit`, `addtocart`, `checkout`,
|
|
22
22
|
`viewcontent`, `lead`, `signup`, `search`, `custom`, ...).
|
|
23
|
-
- **Inline `line_items` for multi-product**
|
|
23
|
+
- **Inline `line_items` for multi-product** - single
|
|
24
24
|
`pintrk('track', 'checkout', { line_items: [...] })` call (NOT N separate
|
|
25
25
|
calls). Built via the standard walkerOS `loop` mapping syntax.
|
|
26
|
-
- **Enhanced matching**
|
|
27
|
-
The Pinterest JS tag auto-hashes `em` with SHA-256
|
|
26
|
+
- **Enhanced matching** - strict allow-list of `em` (email) and `external_id`.
|
|
27
|
+
The Pinterest JS tag auto-hashes `em` with SHA-256 - the destination passes
|
|
28
28
|
raw values through and never hashes.
|
|
29
|
-
- **Auto `event_id` for dedup**
|
|
29
|
+
- **Auto `event_id` for dedup** - every `pintrk('track', ...)` call attaches the
|
|
30
30
|
walkerOS event `id` as `event_id`, ready for cross-channel deduplication with
|
|
31
31
|
a future server (Conversions API) destination.
|
|
32
|
-
- **Consent-aware suppression**
|
|
32
|
+
- **Consent-aware suppression** - `on('consent')` flips a runtime state flag.
|
|
33
33
|
After revocation, subsequent track calls are suppressed even though Pinterest
|
|
34
34
|
has no `opt_in`/`opt_out` SDK API.
|
|
35
35
|
|
|
@@ -84,7 +84,7 @@ npm install @walkeros/web-destination-pinterest
|
|
|
84
84
|
| `apiKey` | `string` | yes | Pinterest Tag ID (numeric string, e.g. `"2612345678901"`). Found in Pinterest Ads Manager under Conversions → Pinterest Tag. Passed to `pintrk('load', tagId)`. |
|
|
85
85
|
| `pageview` | `boolean` | no | Fire `pintrk('page')` once in init after `core.js` loads. Default `true`. Set `false` when walkerOS sources already emit page view events to avoid a duplicate initial fire. |
|
|
86
86
|
| `identify` | `Mapping.Value` | no | Mapping value resolving to `{ em?, external_id? }`. Resolved on the first event and fired via `pintrk('set', data)` whenever the resolved identity changes. |
|
|
87
|
-
| `include` | `string[]` | no | Sections to forward as prefixed properties in track payloads. Pinterest expects specific parameter names
|
|
87
|
+
| `include` | `string[]` | no | Sections to forward as prefixed properties in track payloads. Pinterest expects specific parameter names - explicit `mapping.data` is usually preferred over `include`. |
|
|
88
88
|
| `loadScript` | `boolean` (on `config`) | no | If `true`, the destination injects `https://s.pinimg.com/ct/core.js` on init. Set `false` when the host page already loads the Pinterest Tag snippet. |
|
|
89
89
|
|
|
90
90
|
### Mapping (per-event)
|
|
@@ -95,12 +95,12 @@ npm install @walkeros/web-destination-pinterest
|
|
|
95
95
|
| `data` (top-level) | `EventData` | Standard walkerOS data resolution. The resolved object is sent verbatim as the third arg to `track()`. |
|
|
96
96
|
| `settings.identify` | `{ em?, external_id? }` | Per-event identity override. Fires `pintrk('set', data)` BEFORE the track call when the resolved identity differs from the current state. |
|
|
97
97
|
| `settings.include` | `string[]` | Overrides destination-level `include` for this rule. |
|
|
98
|
-
| `
|
|
98
|
+
| `silent` | `boolean` | Process side effects (identify) but suppress the default `pintrk('track', ...)` call. |
|
|
99
99
|
|
|
100
100
|
## Event Mapping
|
|
101
101
|
|
|
102
102
|
Pinterest expects lowercase concatenated event names. The destination never
|
|
103
|
-
auto-maps
|
|
103
|
+
auto-maps - every conversion event needs an explicit `mapping.name`.
|
|
104
104
|
|
|
105
105
|
| walkerOS event | Pinterest event | Notes |
|
|
106
106
|
| ---------------- | --------------- | ---------------------------------------------------------------------------------- |
|
|
@@ -155,7 +155,7 @@ the JS tag:
|
|
|
155
155
|
|
|
156
156
|
| Field | Source | Notes |
|
|
157
157
|
| ------------- | ---------------------------------- | -------------------------------------------------------- |
|
|
158
|
-
| `em` | `data.email` / `user.email` / etc. | Pinterest auto-hashes
|
|
158
|
+
| `em` | `data.email` / `user.email` / etc. | Pinterest auto-hashes - pass raw email, do NOT pre-hash. |
|
|
159
159
|
| `external_id` | `data.id` / `user.id` | Stable user identifier. Auto-hashed by Pinterest. |
|
|
160
160
|
|
|
161
161
|
The destination strictly limits to these two fields. CAPI-only fields (`ph`,
|
|
@@ -181,7 +181,7 @@ destination and are intentionally not accepted here.
|
|
|
181
181
|
}
|
|
182
182
|
```
|
|
183
183
|
|
|
184
|
-
Identity is diffed against the destination's runtime state
|
|
184
|
+
Identity is diffed against the destination's runtime state -
|
|
185
185
|
`pintrk('set', ...)` only fires when the resolved identity actually changes.
|
|
186
186
|
Destination-level `settings.identify` is resolved lazily on the first event
|
|
187
187
|
(init has no event to bind to), so `pintrk('load', tagId)` is called without an
|
|
@@ -189,7 +189,7 @@ identity object.
|
|
|
189
189
|
|
|
190
190
|
## Consent
|
|
191
191
|
|
|
192
|
-
Pinterest is an advertising platform
|
|
192
|
+
Pinterest is an advertising platform - the Pinterest Tag falls under
|
|
193
193
|
**marketing** consent:
|
|
194
194
|
|
|
195
195
|
```json
|
|
@@ -209,15 +209,15 @@ implements consent revocation as a runtime suppression flag:
|
|
|
209
209
|
3. If consent is later re-granted (all required keys `true`), the flag flips
|
|
210
210
|
back and tracking resumes.
|
|
211
211
|
|
|
212
|
-
The Pinterest Tag itself stays loaded throughout
|
|
212
|
+
The Pinterest Tag itself stays loaded throughout - only the walkerOS bridge goes
|
|
213
213
|
silent.
|
|
214
214
|
|
|
215
|
-
###
|
|
215
|
+
### Suppressing the default track on a fully configured rule
|
|
216
216
|
|
|
217
217
|
```json
|
|
218
218
|
"user": {
|
|
219
219
|
"update": {
|
|
220
|
-
"
|
|
220
|
+
"silent": true,
|
|
221
221
|
"settings": {
|
|
222
222
|
"identify": {
|
|
223
223
|
"map": { "em": "data.email", "external_id": "data.id" }
|
|
@@ -227,7 +227,7 @@ silent.
|
|
|
227
227
|
}
|
|
228
228
|
```
|
|
229
229
|
|
|
230
|
-
`mapping.
|
|
230
|
+
`mapping.silent: true` processes side effects (the `pintrk('set', ...)` identity
|
|
231
231
|
update) but suppresses the default `pintrk('track', ...)` call. Useful when you
|
|
232
232
|
only want to refresh enhanced matching without firing a conversion.
|
|
233
233
|
|
package/dist/dev.d.mts
CHANGED
|
@@ -138,24 +138,24 @@ declare namespace env {
|
|
|
138
138
|
* - Zero SDK calls: out = []
|
|
139
139
|
*/
|
|
140
140
|
/**
|
|
141
|
-
* Default event forwarding
|
|
141
|
+
* Default event forwarding - no rule. Without a mapping.name, the walkerOS
|
|
142
142
|
* event name is forwarded as-is. Pinterest accepts it but won't match a
|
|
143
143
|
* standard conversion event. event_id is auto-attached for deduplication.
|
|
144
144
|
*/
|
|
145
145
|
declare const defaultForward: Flow.StepExample;
|
|
146
146
|
/**
|
|
147
|
-
* Wildcard ignore pattern
|
|
147
|
+
* Wildcard ignore pattern - the standard walkerOS way to suppress noisy
|
|
148
148
|
* events. `mapping.ignore: true` at rule level produces zero SDK calls.
|
|
149
149
|
*/
|
|
150
150
|
declare const wildcardIgnored: Flow.StepExample;
|
|
151
151
|
/**
|
|
152
152
|
* Standard Pinterest event rename via mapping.name. walkerOS "page view"
|
|
153
153
|
* → Pinterest "pagevisit". The ONLY way to get Pinterest to recognize
|
|
154
|
-
* a conversion event
|
|
154
|
+
* a conversion event - the destination never auto-maps.
|
|
155
155
|
*/
|
|
156
156
|
declare const pageViewRename: Flow.StepExample;
|
|
157
157
|
/**
|
|
158
|
-
* Search
|
|
158
|
+
* Search - walkerOS site search → Pinterest "search" with search_query.
|
|
159
159
|
* Illustrates single-field mapping.data resolution.
|
|
160
160
|
*/
|
|
161
161
|
declare const siteSearch: Flow.StepExample;
|
|
@@ -168,7 +168,7 @@ declare const productViewContent: Flow.StepExample;
|
|
|
168
168
|
*/
|
|
169
169
|
declare const productAddToCart: Flow.StepExample;
|
|
170
170
|
/**
|
|
171
|
-
* Multi-product checkout
|
|
171
|
+
* Multi-product checkout - the canonical Pinterest ecommerce pattern.
|
|
172
172
|
*/
|
|
173
173
|
declare const orderCompleteCheckout: Flow.StepExample;
|
|
174
174
|
/**
|
|
@@ -176,25 +176,25 @@ declare const orderCompleteCheckout: Flow.StepExample;
|
|
|
176
176
|
*/
|
|
177
177
|
declare const userLoginLead: Flow.StepExample;
|
|
178
178
|
/**
|
|
179
|
-
* mapping.
|
|
179
|
+
* mapping.silent - processes side effects (identify set) but suppresses
|
|
180
180
|
* the default pintrk('track', ...) call.
|
|
181
181
|
*/
|
|
182
|
-
declare const
|
|
182
|
+
declare const identifyOnlySilent: Flow.StepExample;
|
|
183
183
|
/**
|
|
184
|
-
* Consent revocation
|
|
184
|
+
* Consent revocation - walkerOS walker consent { marketing: false }.
|
|
185
185
|
* The destination's on('consent') handler flips the runtime state flag
|
|
186
186
|
* and stops calling pintrk('track', ...) for subsequent events.
|
|
187
187
|
*/
|
|
188
188
|
declare const consentRevoke: Flow.StepExample;
|
|
189
189
|
/**
|
|
190
|
-
* Consent grant
|
|
190
|
+
* Consent grant - explicit opt-in.
|
|
191
191
|
*/
|
|
192
192
|
declare const consentGrant: Flow.StepExample;
|
|
193
193
|
|
|
194
194
|
declare const step_consentGrant: typeof consentGrant;
|
|
195
195
|
declare const step_consentRevoke: typeof consentRevoke;
|
|
196
196
|
declare const step_defaultForward: typeof defaultForward;
|
|
197
|
-
declare const
|
|
197
|
+
declare const step_identifyOnlySilent: typeof identifyOnlySilent;
|
|
198
198
|
declare const step_orderCompleteCheckout: typeof orderCompleteCheckout;
|
|
199
199
|
declare const step_pageViewRename: typeof pageViewRename;
|
|
200
200
|
declare const step_productAddToCart: typeof productAddToCart;
|
|
@@ -203,7 +203,7 @@ declare const step_siteSearch: typeof siteSearch;
|
|
|
203
203
|
declare const step_userLoginLead: typeof userLoginLead;
|
|
204
204
|
declare const step_wildcardIgnored: typeof wildcardIgnored;
|
|
205
205
|
declare namespace step {
|
|
206
|
-
export { step_consentGrant as consentGrant, step_consentRevoke as consentRevoke, step_defaultForward as defaultForward,
|
|
206
|
+
export { step_consentGrant as consentGrant, step_consentRevoke as consentRevoke, step_defaultForward as defaultForward, step_identifyOnlySilent as identifyOnlySilent, step_orderCompleteCheckout as orderCompleteCheckout, step_pageViewRename as pageViewRename, step_productAddToCart as productAddToCart, step_productViewContent as productViewContent, step_siteSearch as siteSearch, step_userLoginLead as userLoginLead, step_wildcardIgnored as wildcardIgnored };
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
declare const index_env: typeof env;
|
package/dist/dev.d.ts
CHANGED
|
@@ -138,24 +138,24 @@ declare namespace env {
|
|
|
138
138
|
* - Zero SDK calls: out = []
|
|
139
139
|
*/
|
|
140
140
|
/**
|
|
141
|
-
* Default event forwarding
|
|
141
|
+
* Default event forwarding - no rule. Without a mapping.name, the walkerOS
|
|
142
142
|
* event name is forwarded as-is. Pinterest accepts it but won't match a
|
|
143
143
|
* standard conversion event. event_id is auto-attached for deduplication.
|
|
144
144
|
*/
|
|
145
145
|
declare const defaultForward: Flow.StepExample;
|
|
146
146
|
/**
|
|
147
|
-
* Wildcard ignore pattern
|
|
147
|
+
* Wildcard ignore pattern - the standard walkerOS way to suppress noisy
|
|
148
148
|
* events. `mapping.ignore: true` at rule level produces zero SDK calls.
|
|
149
149
|
*/
|
|
150
150
|
declare const wildcardIgnored: Flow.StepExample;
|
|
151
151
|
/**
|
|
152
152
|
* Standard Pinterest event rename via mapping.name. walkerOS "page view"
|
|
153
153
|
* → Pinterest "pagevisit". The ONLY way to get Pinterest to recognize
|
|
154
|
-
* a conversion event
|
|
154
|
+
* a conversion event - the destination never auto-maps.
|
|
155
155
|
*/
|
|
156
156
|
declare const pageViewRename: Flow.StepExample;
|
|
157
157
|
/**
|
|
158
|
-
* Search
|
|
158
|
+
* Search - walkerOS site search → Pinterest "search" with search_query.
|
|
159
159
|
* Illustrates single-field mapping.data resolution.
|
|
160
160
|
*/
|
|
161
161
|
declare const siteSearch: Flow.StepExample;
|
|
@@ -168,7 +168,7 @@ declare const productViewContent: Flow.StepExample;
|
|
|
168
168
|
*/
|
|
169
169
|
declare const productAddToCart: Flow.StepExample;
|
|
170
170
|
/**
|
|
171
|
-
* Multi-product checkout
|
|
171
|
+
* Multi-product checkout - the canonical Pinterest ecommerce pattern.
|
|
172
172
|
*/
|
|
173
173
|
declare const orderCompleteCheckout: Flow.StepExample;
|
|
174
174
|
/**
|
|
@@ -176,25 +176,25 @@ declare const orderCompleteCheckout: Flow.StepExample;
|
|
|
176
176
|
*/
|
|
177
177
|
declare const userLoginLead: Flow.StepExample;
|
|
178
178
|
/**
|
|
179
|
-
* mapping.
|
|
179
|
+
* mapping.silent - processes side effects (identify set) but suppresses
|
|
180
180
|
* the default pintrk('track', ...) call.
|
|
181
181
|
*/
|
|
182
|
-
declare const
|
|
182
|
+
declare const identifyOnlySilent: Flow.StepExample;
|
|
183
183
|
/**
|
|
184
|
-
* Consent revocation
|
|
184
|
+
* Consent revocation - walkerOS walker consent { marketing: false }.
|
|
185
185
|
* The destination's on('consent') handler flips the runtime state flag
|
|
186
186
|
* and stops calling pintrk('track', ...) for subsequent events.
|
|
187
187
|
*/
|
|
188
188
|
declare const consentRevoke: Flow.StepExample;
|
|
189
189
|
/**
|
|
190
|
-
* Consent grant
|
|
190
|
+
* Consent grant - explicit opt-in.
|
|
191
191
|
*/
|
|
192
192
|
declare const consentGrant: Flow.StepExample;
|
|
193
193
|
|
|
194
194
|
declare const step_consentGrant: typeof consentGrant;
|
|
195
195
|
declare const step_consentRevoke: typeof consentRevoke;
|
|
196
196
|
declare const step_defaultForward: typeof defaultForward;
|
|
197
|
-
declare const
|
|
197
|
+
declare const step_identifyOnlySilent: typeof identifyOnlySilent;
|
|
198
198
|
declare const step_orderCompleteCheckout: typeof orderCompleteCheckout;
|
|
199
199
|
declare const step_pageViewRename: typeof pageViewRename;
|
|
200
200
|
declare const step_productAddToCart: typeof productAddToCart;
|
|
@@ -203,7 +203,7 @@ declare const step_siteSearch: typeof siteSearch;
|
|
|
203
203
|
declare const step_userLoginLead: typeof userLoginLead;
|
|
204
204
|
declare const step_wildcardIgnored: typeof wildcardIgnored;
|
|
205
205
|
declare namespace step {
|
|
206
|
-
export { step_consentGrant as consentGrant, step_consentRevoke as consentRevoke, step_defaultForward as defaultForward,
|
|
206
|
+
export { step_consentGrant as consentGrant, step_consentRevoke as consentRevoke, step_defaultForward as defaultForward, step_identifyOnlySilent as identifyOnlySilent, step_orderCompleteCheckout as orderCompleteCheckout, step_pageViewRename as pageViewRename, step_productAddToCart as productAddToCart, step_productViewContent as productViewContent, step_siteSearch as siteSearch, step_userLoginLead as userLoginLead, step_wildcardIgnored as wildcardIgnored };
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
declare const index_env: typeof env;
|