Skip to main content

Pinterest Tag

Web Source code Package

The Pinterest Tag forwards browser conversions to Pinterest Ads Manager for ad optimization, retargeting, and audience building. This destination wraps the standard Pinterest Tag snippet (loaded from s.pinimg.com/ct/core.js); there is no npm SDK for the browser tag. Mapped events become window.pintrk('track', eventName, { ..., event_id }) calls, with optional pintrk('set', ...) for enhanced matching.

Where this fits

Pinterest Tag is a web destination in the walkerOS flow:

Installation

Loading...
Loading...

Configuration

This destination uses the standard destination config wrapper (consent, data, env, id, ...). For the shared fields see destination configuration. Package-specific fields live under config.settings and are listed below.

Settings

PropertyTypeDescriptionMore
apiKey*stringYour Pinterest Tag ID (numeric string, e.g. "2612345678901"). Found in Pinterest Ads Manager under Conversions → Pinterest Tag. Passed to pintrk("load", tagId).
pageviewbooleanFire pintrk("page") once in init after core.js loads. Default true (matches Pinterest's base code convention). Set false when walkerOS sources already emit page view events and you would otherwise get a duplicate initial fire.
identifyanywalkerOS mapping value resolving to enhanced matching fields: { em?: string, external_id?: string }. em is auto-hashed by the Pinterest JS tag — do not hash before passing. Passed to pintrk("load", tagId, data) on init and pintrk("set", data) when the resolved value changes.
* Required fields

Mapping

Per-event rules under config.mapping. For the standard rule fields (consent, condition, data, batch, name, policy) see mapping.

PropertyTypeDescriptionMore
identifyanyPer-event identity override. Resolves to { em?, external_id? } and fires pintrk("set", data) when the resolved value differs from the current state.

Examples

Default forward

Without a mapping the walker event name is forwarded as-is to pintrk track with an event_id for dedup.

Event
Out

Identify only

A user update fires pintrk set for enhanced matching without a track call via mapping skip.

Event
Mapping
Out

Checkout

A completed order fires Pinterest checkout with value, order_id, currency, and a nested line_items array.

Event
Mapping
Out

Page visit

A mapping renames the walker event to the Pinterest standard pagevisit event for conversion tracking.

Event
Mapping
Out

Add to cart

A product add fires Pinterest addtocart with value, currency, and a single-item line_items array.

Event
Mapping
Out

View content

A product view fires Pinterest viewcontent with value, currency, product_id, and product_name.

Event
Mapping
Out

Search

A site search fires Pinterest search with the search_query field resolved from event data.

Event
Mapping
Out

Lead with matching

A user login fires pintrk set for enhanced matching and then a lead conversion track call.

Event
Mapping
Out

Standard event taxonomy

Pinterest expects lowercase concatenated event names. The destination never auto-maps. Every conversion event needs an explicit mapping.name.

walkerOS eventPinterest eventNotes
page viewpagevisitFired automatically by pintrk('page') on init unless settings.pageview: false.
product viewviewcontentSingle product. Use value, currency, product_id, product_name.
product addaddtocartSingle product. Wrap in a line_items array if you also want item-level data.
order completecheckoutMulti-product. Use mapping.data.line_items.loop to iterate event.nested.
site searchsearchUse search_query field.
user loginleadOptional lead_type. Combine with settings.identify for enhanced matching.
user signupsignupSame identify pattern as lead.
(custom)customSend Pinterest's custom event for non-standard conversions.

Enhanced matching

Pinterest's web tag accepts two enhanced matching fields, both auto-hashed by the JS tag with SHA-256:

FieldSourceNotes
emdata.email / user.email / etc.Pinterest auto-hashes. Pass raw email, do NOT pre-hash.
external_iddata.id / user.idStable user identifier. Auto-hashed by Pinterest.

The destination strictly limits to these two fields. CAPI-only fields (ph, fn, ln, address, country, ip, ua) belong to the future server destination and are intentionally not accepted here.

Identity is diffed against the destination's runtime state, and pintrk('set', ...) only fires when the resolved identity actually changes. The destination-level settings.identify is resolved lazily on the first event (init has no event to bind to), so pintrk('load', tagId) is called without an identity object.

Pinterest is an advertising platform. The walkerOS consent key is marketing (not analytics):

Loading...

The walkerOS config.consent gate blocks unconsented events from reaching the destination in the first place. Pinterest has no opt_in/opt_out SDK API, so the destination implements consent revocation as a runtime suppression flag:

  1. on('consent') reads config.consent to determine which keys to check.
  2. If any required key resolves to false, the destination flips _state.consentGranted = false and silently suppresses all subsequent pintrk('track', ...) calls.
  3. If consent is later re-granted (all required keys true), the flag flips back and tracking resumes.

The Pinterest Tag itself stays loaded throughout. Only the walkerOS bridge goes silent.

Auto page view

The destination fires pintrk('page') once on init by default to match Pinterest's base code convention. Set settings.pageview: false if your walkerOS sources already emit page view events that you map to pagevisit, which prevents a duplicate initial fire.

Future: Conversions API

A server-side Pinterest Conversions API destination is planned as a follow-up, matching the Meta / TikTok / LinkedIn web+server split. It will share the event_id field with this web destination for cross-channel deduplication.

💡 Need implementation support?
elbwalker offers hands-on support: setup review, measurement planning, destination mapping, and live troubleshooting. Book a 2-hour session (€399)