Pinterest Tag
Pinterest Tag is Pinterest's conversion tracking and audience building tool. It measures the actions people take on your site after seeing your Pins, so you can attribute conversions and build retargeting audiences for Pinterest Ads.
Official Pinterest documentation
Integrate with c15t
How c15t loads it
- Category:
marketing(Ads & Pixels) - Loads when: marketing consent is granted
- On revocation: persists — c15t calls
pintrk('setconsent', false), which stops Pinterest from sending events and clears its first-party cookies without removing the script
Before the loader runs, c15t recreates Pinterest's base code: it defines the pintrk queue stub with version = "3.0", then queues pintrk('load', tagId), pintrk('setconsent', true), and pintrk('page'). Pinterest's core.js replays the queue once it loads.
Configure the integration
You can pass extra load options and disable the default page-visit event when you need finer control:
loadOptions is forwarded as the third argument to pintrk('load', tagId, loadOptions). Pinterest uses em (email) and external_id for enhanced match, and hashes plain values before sending them.
Warning
Enhanced match values are personal data. Only pass em or external_id when
your application has separately obtained consent to share them with
Pinterest — marketing consent alone does not cover this.
Tracking events in your app
c15t gates the Pinterest Tag from loading until marketing consent is granted. After consent is granted the script stays in the DOM, and c15t calls pintrk('setconsent', false) if consent is later revoked, so Pinterest itself suppresses events.
This means window.pintrk is only defined after the user has granted marketing consent at least once. Use pinterestTagEvent() for typed standard and custom events — it's a no-op until pintrk exists, so it's safe to call before consent, and it doesn't bypass consent afterwards. Guarding with has('marketing') is still good practice so you don't queue events Pinterest will drop:
From plain JavaScript:
Pass event_id when you also send the same event through the Pinterest Conversions API so Pinterest can deduplicate the two. Product details (product_name, product_id, product_price, and so on) go inside line_items, one entry per product — Pinterest ignores them at the top level.
Event names
Pinterest recognises 20 event types for conversion tracking: checkout, addtocart, pagevisit, signup, watchvideo, lead, search, viewcategory, custom, addpaymentinfo, addtowishlist, initiatecheckout, subscribe, viewcontent, contact, schedule, findlocation, customizeproduct, submitapplication, and starttrial. pinterestTagEvent() also accepts any other string as a user-defined event, which Pinterest uses for audience targeting only — it logs a console warning for these.
Which events you need depends on the campaign type. Conversions campaigns require at least one of signup, lead, addtocart, or checkout; catalog sales, conversion insights, dynamic retargeting, and the Verified Merchant Program all require pagevisit, addtocart, and checkout with currency set. See Add event codes for the full matrix.
Debugging with a callback
Pinterest accepts an optional (didInit, error) callback after the event data. Pass it as the third argument to pinterestTagEvent() to surface tag errors during development:
Types
PinterestTagOptions
Warning: ExtractedTypeTable: Could not extract "PinterestTagOptions" from "./packages/scripts/src/vendors/ads-and-pixels/pinterest-tag.ts" using base path "/vercel/path0/apps/c15t-docs/.leadtype/c15t". Verify the path/name and that the file is included by your tsconfig.
PinterestTagLoadOptions
Warning: ExtractedTypeTable: Could not extract "PinterestTagLoadOptions" from "./packages/scripts/src/vendors/ads-and-pixels/pinterest-tag.ts" using base path "/vercel/path0/apps/c15t-docs/.leadtype/c15t". Verify the path/name and that the file is included by your tsconfig.
PinterestTagEventData
Warning: ExtractedTypeTable: Could not extract "PinterestTagEventData" from "./packages/scripts/src/vendors/ads-and-pixels/pinterest-tag.ts" using base path "/vercel/path0/apps/c15t-docs/.leadtype/c15t". Verify the path/name and that the file is included by your tsconfig.
PinterestTagLineItem
Warning: ExtractedTypeTable: Could not extract "PinterestTagLineItem" from "./packages/scripts/src/vendors/ads-and-pixels/pinterest-tag.ts" using base path "/vercel/path0/apps/c15t-docs/.leadtype/c15t". Verify the path/name and that the file is included by your tsconfig.
PinterestTagEventCallback
Warning: ExtractedTypeTable: Could not extract "PinterestTagEventCallback" from "./packages/scripts/src/vendors/ads-and-pixels/pinterest-tag.ts" using base path "/vercel/path0/apps/c15t-docs/.leadtype/c15t". Verify the path/name and that the file is included by your tsconfig.
Script
Warning: ExtractedTypeTable: Could not extract "Script" from "./packages/core/src/libs/script-loader/types.ts" using base path "/vercel/path0/apps/c15t-docs/.leadtype/c15t". Verify the path/name and that the file is included by your tsconfig.