Skip to content

Developer Platform

Search docs & API
Log in
Sign up

Track conversions with Pinterest Tag

The Pinterest Tag allows you to track actions people take on your website after viewing your ad on Pinterest.
Use this information to measure your return on ad spend (RoAS) and to create target audiences.
Use this information to measure your return on ad spend (RoAS) and to create target audiences.
The Pinterest Tag has two components:
  • The base code that you place on every page on your website
  • The event code that you place on pages where you want to track conversions

Base code

The base code is required for conversion tracking. It's generated in the Conversion Tag Manager (link requires login), and it contains your unique tag ID.
  • You only need to generate the base code once for your account.
We recommend putting the code on every page of your website. This lets you create audience lists for your entire website.
We recommend putting the code on every page of your website. This lets you create audience lists for your entire website.
  • At a minimum, you must place the base code on any page where you want to track conversions.
  • Place the base code between the
    <head>
    and
    </head>
    tags in your HTML. It must appear only once on a page and must run before the subsequent event code.
Example of Pinterest Conversion Tag base code:
It is not recommended to copy and paste the tag code from this guide.
It is not recommended to copy and paste the tag code from this guide.
<script type="text/javascript"> function(e){ if(!window.pintrk){ window.pintrk=function(){ window.pintrk.queue.push(Array.prototype.slice.call(arguments)) }; var n=window.pintrk; n.queue=[],n.version="3.0"; var t=document.createElement("script"); t.async=!0,t.src=e; var r=document.getElementsByTagName("script")[0]; r.parentNode.insertBefore(t,r) } }("https://s.pinimg.com/ct/core.js"); pintrk('load', 'YOUR_TAG_ID'); pintrk('page'); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&noscript=1" /> </noscript>
  • Get your personalized base code from our UI or API.
  • When you obtain your base code from our UI or API, it will have your unique Pinterest Conversion Tag ID inserted in the proper locations of the code, where you see
    YOUR_TAG_ID
    in the above example.

Event code

To track conversions, you must specify an event code in addition to the base code. What follows includes information on the event code types you can use, templates showing how to use event codes, and recommendations on event code placement.

Event types

The table below shows the events that you can track with the Pinterest Conversion Tag.

Event type table

Event
Purpose
Usable for Audience Creation
Usable for Conversion Reporting
AddPaymentInfo
Track people who enter payment information, such as a credit card number.
No
Yes
AddToCart
Track people who add items to shopping carts.
Yes
Yes
AddToWishList
Track people who add a viewed item to a wish list.
No
Yes
Checkout
Track people who complete transactions.
Yes
Yes
Contact
Track people who contact you through phone, email, chat or other methods.
Yes
 
CustomizeProduct
Track people who customize a product using a tool on your website or app.
Yes
 
FindLocation
Track people who find your business location through web or app.
Yes
 
InitiateCheckout
Track people start the process of checking out an item for purchase but do not complete it.
No
Yes
Lead
Track people who show interest in your product or service.
Yes
Yes
PageVisit
Track people who view primary pages, such as product pages and article pages.
Yes
Yes
Search
Track people who search for products or services you offer.
Yes
Yes
Schedule
Track people who schedule an appointment at one of your business locations.
Yes
 
SignUp
Track people who sign up for your product or service.
Yes
Yes
StartTrial
Track people who start a free trial of a product or service.
Yes
 
Subscribe
Track people who subscribe to receive information and updates related to products or services.
No
Yes
SubmitApplication
Track people who complete and submit an application for a product, service, or program.
Yes
 
ViewCategory
Track people who view category pages.
Yes
Yes
ViewContent
Track people who view site content.
No
Yes
WatchVideo
Track people who watch videos.
Yes
Yes
Custom event that you name
Track an event that does not conform to any of the Pinterest-defined types.
You give this event a unique name that is meaningful to your business.
Create the name with any upper- or lower-case letters (treated as case insensitive), numerals 0 through 9, underscores
_
, and hyphens
-
.
Limit the name to 100 characters.
Example:
TookSurvey
Make sure to map any custom event to a Pinterest standard event.
 
 

Event code template

Specify the event type in two places:
  • In JavaScript code within a
    script
    tag
  • In an image tag within a
    noscript
    block
Also, replace the
YOUR_TAG_ID
placeholder shown in the code examples with your Pinterest Conversion Tag ID from your base code.
For conversion tracking and reporting, specify one of the standard Pinterest event types in the event code, as in the following example:
<script> pintrk('track', 'AddToWishList'); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&amp;event=AddToWishList&amp;noscript=1" /> </noscript>
You also can specify your own custom event, as in the following example:
<script> pintrk('track', 'TookSurvey'); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&amp;event=TookSurvey&amp;noscript=1" /> </noscript>

Event code placement

Both the base code and event code must be added to any page where you want to track conversions:
  • The base code should be placed on every page of your website
  • The event code should be placed on pages where you want to track conversions
The base code must run before the event code.
The base code must run before the event code.
  • In some cases, you can be certain an action has occurred as soon as a given page loads -- for example, when your website loads a checkout confirmation page, you are certain that a checkout has occurred. In this case, you should place the base code and the checkout event code between the
    <head>
    and
    </head>
    tags on your checkout confirmation page. This placement ensures that the codes run as soon as the page is loaded.
  • However, some events are triggered only after a user takes a specific action on a page, such as clicking a button or submitting a form. In this case, you need to be sure that the event code runs only as a result of the action. This requires understanding of the existing event handlers in your page’s JavaScript code.

Event data in JavaScript

You can provide additional information about an event by attaching an object that contains event data.
We only offer reporting on the
value
and
order_quantity
event data at this time. Any additional event data is available for audience targeting but is not available for conversion reporting.
We only offer reporting on the
value
and
order_quantity
event data at this time. Any additional event data is available for audience targeting but is not available for conversion reporting.

Events required for conversion and audiences

See this table for event data required for tracking conversions and creating audiences. You also can create your own set of event data fields for audience targeting.
Event dataSample valueTypeAudience creationConversion reporting
event_id
eventId0001
String (an id string that uniquely identifies the event)NoNo
value
100.00
Number (integer or floating point)YesYes
order_quantity
1
IntegerYesYes
currency
USD
One of the following:
USD
GBP
CAD
EUR
AUD
or
NZD
YesYes
order_id
X-15148
StringYesYes
product_name
Parker Boots
line_items
array
YesNo
product_id
1414
line_items
array
YesYes
product_category
Shoes
line_items
array
YesRecommended
product_variant_id
1414-Red
line_items
array
YesNo
product_variant
Red
line_items
array
YesNo
product_price
99.99
Number (integer or floating point),
line_items
array
YesNo
product_quantity
1
Integer,
line_items
array
YesNo
product_brand
Parker
line_items
array
YesNo
promo_code
WINTER10
StringYesNo
property
Athleta
StringYesNo
search_query
boots
StringYesNo
video_title
How to style your Parker Boots
StringYesNo
lead_type
Newsletter
StringYesNo

Events required for campaigns

See the following table for events and event data types that are required for different campaigns:
Campaign typeRequired eventsRecommended eventsRequired event dataRecommended event data
Brand awarenessNone
add_to_cart
checkout
lead
page_visit
signup
None
Enhanced match
Catalog sales
add_to_cart
checkout
page_visit
lead
signup
currency
(Required for
add_to_cart
and
checkout
events)
  • order_id
  • product_id
  • value
Enhanced match
  • product_category
ConsiderationNone
add_to_cart
checkout
lead
page_visit
signup
None
Enhanced match
Conversions
At least one of:
  • add_to_cart
  • checkout
  • lead
  • signup
Enhanced match
  • order_id
  • product_id
  • value
None
Enhanced match
  • currency
  • product_category
Video completionNoneNoneNone
Enhanced match
The example event code below tracks a checkout event with event data describing a purchase of two products. Keep in mind this example is the JavaScript portion of the event code. In this example,
order_quantity
value
and
event_id
are hardcoded, but you may want to pass back these values dynamically. See Value and quantity event data for examples of dynamic
value
and
quantity
.
<script> pintrk('track', 'checkout', { value: 10.0, order_quantity: 2, currency: 'USD', event_id: 'eventId0001', line_items: [ { product_name: 'Parker Boots', product_id: '1414', product_price: 5.0, product_quantity: 1, }, { product_name: 'Parker Sandals', product_id: 'ABC', product_price: 5.0, product_quantity: 1, }, ], }); </script>

Event data examples

See examples below of event code for various events and their event data. Keep in mind that you can include any combination of event data per event besides what’s shown in the examples below.

PageVisit

<script> pintrk('track', 'pagevisit', { promo_code: 'WINTER10', event_id: 'eventId0001', }); </script>

Signup

<script> pintrk('track', 'signup', { lead_type: 'New release promotion', }); </script>

Checkout

<script> pintrk('track', 'checkout', { value: 116, order_quantity: 2, currency: 'USD', line_items: [ { product_name: 'Pillows (Set of 2)', product_id: '11', product_price: 48.0, product_quantity: 1, }, { product_name: 'Pillows, Large (Set of 2)', product_id: '15', product_price: 68.0, product_quantity: 1, }, ], }); </script>

WatchVideo

<script> pintrk('track', 'watchVideo', { video_title: 'My product video 01', }); </script>

Lead

<script> pintrk('track', 'lead', { lead_type: 'Newsletter', }); </script>

Event data in the img tag

In addition to event data in JavaScript as shown in the section above, you can also optionally include event data in the
<img>
tag as well. See the example below for a checkout event with event data.
As a best practice we recommend you include both the JavaScript and image tag portions of the event code, as this provides for better user targeting. The
<noscript>
tag acts as a backup in case people have JavaScript disabled in their browsers. However, if you choose you can include only the image tag event code without JavaScript. In this case you do not need the base code, you only need to add the image tag event code to the page you want to track.
<noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID &event=checkout &ed[value]=10.00 &ed[order_quantity]=2 &ed[currency]=USD &ed[event_id]=YOUR_EVENT_ID &ed[line_items][0][product_name]=Parker+Boots &ed[line_items][0][product_id]='1414' &ed[line_items][0][product_price]=5.00 &ed[line_items][0][product_quantity]=1 &ed[line_items][1][product_name]=Parker+Sandals &ed[line_items][1][product_id]='ABC' &ed[line_items][1][product_price]=5.00 &ed[line_items][1][product_quantity]=1 &noscript=1" /> </noscript>
The code above shows what the
<img>
tag above looks like when we separate the data parameters for better readability.
Adding whitespace in the src attribute will break the code.
Adding whitespace in the src attribute will break the code.
The actual code will look like this:
<noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=checkout&ed[value]=10.00&ed[order_quantity]=2&ed[currency]=USD&ed[event_id]=YOUR_EVENT_ID&ed[line_items][0][product_name]=Parker+Boots&[line_items][0][product_id]='1414'&ed[line_items][0][product_price]=5.00&ed[line_items][0][product_quantity]=1&ed[line_items][1][product_name]=Parker+Sandals&ed[line_items][1][product_id]='ABC'&ed[line_items][1][product_price]=5.00&ed[line_items][1][product_quantity]=1&noscript=1" /> </noscript>

Value and quantity event data

Value and order quantity are the two pieces of event data currently available in conversion reporting. If you want to add value and quantity you can either hardcode the values or pass them back dynamically. If you’d like to pass back value and quantity dynamically (recommended), this will be unique to your website and how you record sales.

Example of hard-coded value and quantity

<script> pintrk('track', 'checkout', { value: 10.0, // Read this value (must be a number) order_quantity: 5, // Read this quantity (must be an integer) }); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=123456789&event=checkout&ed[value]=10.00&ed[order_quantity]=5&noscript=1" /> </noscript>
  • Reported value: 10.00
  • Reported quantity: 5

Example of dynamic value and quantity

<head> <script type="text/javascript"> !(function (e) { if (!window.pintrk) { window.pintrk = function () { window.pintrk.queue.push(Array.prototype.slice.call(arguments)); }; var n = window.pintrk; ((n.queue = []), (n.version = '3.0')); var t = document.createElement('script'); ((t.async = !0), (t.src = e)); var r = document.getElementsByTagName('script')[0]; r.parentNode.insertBefore(t, r); } })('https://s.pinimg.com/ct/core.js'); pintrk('load', '123456789'); pintrk('page'); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=123456789&noscript=1" /> </noscript> <script> pintrk('track', 'pagevisit'); pintrk('track', 'addtocart'); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=123456789&event=pagevisit&noscript=1" /> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=123456789&event=addtocart&noscript=1" /> </noscript> </head>
  • Reported value: Dynamic amount purchased with the corresponding checkout
  • Reported quantity: Dynamic quantity purchased with the corresponding checkout
The setup of dynamic order quantity and value is unique to your website.
The setup of dynamic order quantity and value is unique to your website.

Example 1

Track a page visit event with no additional event data.
  • Example Conversion Tag ID
    123456789
    (replace with your Pinterest Conversion Tag ID)
  • Example event code:
    pagevisit
<head> <script type="text/javascript"> !(function (e) { if (!window.pintrk) { window.pintrk = function () { window.pintrk.queue.push(Array.prototype.slice.call(arguments)); }; var n = window.pintrk; ((n.queue = []), (n.version = '3.0')); var t = document.createElement('script'); ((t.async = !0), (t.src = e)); var r = document.getElementsByTagName('script')[0]; r.parentNode.insertBefore(t, r); } })('https://s.pinimg.com/ct/core.js'); pintrk('load', '123456789'); pintrk('page'); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=123456789&noscript=1" /> </noscript> <script> pintrk('track', 'pagevisit'); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=123456789&event=pagevisit&noscript=1" /> </noscript> </head>

Example 2

Fire two event codes on one page:
  • Example Conversion Tag ID
    123456789
    (replace with your Pinterest Conversion Tag ID)
  • Example event codes:
    pagevisit
    and
    addtocart
Be sure that the event code is placed after the base code on your website.
Be sure that the event code is placed after the base code on your website.
<head> <script type="text/javascript"> !(function (e) { if (!window.pintrk) { window.pintrk = function () { window.pintrk.queue.push(Array.prototype.slice.call(arguments)); }; var n = window.pintrk; ((n.queue = []), (n.version = '3.0')); var t = document.createElement('script'); ((t.async = !0), (t.src = e)); var r = document.getElementsByTagName('script')[0]; r.parentNode.insertBefore(t, r); } })('https://s.pinimg.com/ct/core.js'); pintrk('load', '123456789'); pintrk('pagevisit'); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=123456789&noscript=1" /> </noscript> <script> pintrk('track', 'pagevisit'); pintrk('track', 'addtocart'); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=123456789&event=pagevisit&noscript=1" /> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=123456789&event=addtocart&noscript=1" /> </noscript> </head>

Copy event code examples

This section contains an example of every event type in a complete, copyable format that you can place on your site with minimal effort. Each example has the essential recommended event data implemented to get started tracking activity on your website.
You will need to replace example values with the appropriate static value or dynamic variable for your website. For example, you will most likely want to track order value dynamically, but you might assign a static value to the event data lead_type if it is placed on one specific page only.
You will need to replace example values with the appropriate static value or dynamic variable for your website. For example, you will most likely want to track order value dynamically, but you might assign a static value to the event data lead_type if it is placed on one specific page only.

Checkout

<script> pintrk('track', 'checkout', { value: 10.0, order_quantity: 2, currency: 'USD', event_id: ‘eventId0001’, }); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=checkout&ed[value]=10.00&ed[order_quantity]=2&ed[event_id]=eventId0001&noscript=1" /> </noscript>
Event data:
value
order_quantity
currency
and
event_id
Make sure to input the correct currency code (see event data) for your website.
Make sure to input the correct currency code (see event data) for your website.

AddToCart

<script> pintrk('track', 'AddToCart', { value: 10.0, order_quantity: 1, currency: 'USD', }); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=AddToCart&ed[value]=10.00&ed[order_quantity]=1&noscript=1" /> </noscript>
Event data:
value
order_quantity
and
currency
. Be sure to input the correct currency code for your website.

Pagevisit

<script> pintrk('track', 'pagevisit'); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=pagevisit&noscript=1" /> </noscript>
  • Event data: none

Signup

<script> pintrk('track', 'signup'); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=signup&noscript=1" /> </noscript>
  • Event data: none

WatchVideo

<script> pintrk('track', 'watchvideo', { video_title: 'My Product Video 01', }); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=watchvideo&ed[video_title]=My+Product+Video+01&noscript=1" /> </noscript>
  • Event data:
    video_title

Lead

<script> pintrk('track', 'lead', { lead_type: 'Newsletter', }); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=lead&ed[lead_type]=Newsletter&noscript=1" /> </noscript>
  • Event data:
    lead_type

Search

<script> pintrk('track', 'search', { search_query: 'horse', }); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=search&ed[search_query]=horse&noscript=1" /> </noscript>
  • Event data:
    search_query

ViewCategory

<script> pintrk('track', 'viewcategory'); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=viewcategory&noscript=1" /> </noscript>
  • Event data: none

Your own custom-defined event

In this example, your custom-defined event is
TookSurvey
.
<script> pintrk('track', 'TookSurvey'); </script> <noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=TookSurvey&noscript=1" /> </noscript>
  • Event data: none

Callback

In addition to the event data, you can pass a JavaScript callback function as an optional argument to the function
pintrk()
. This callback function runs every time that an event tracking call, the function
pintrk()
, is triggered.
The callback function takes the following two arguments:
  • didInit: This first argument receives a boolean value, which is set to be true if the event tracking call is successfully constructed, and false if an error is detected while making the event tracking call.
  • error: If
    didInit
    returns
    false
    , this second argument receives a string that describes the error. If
    didInit
    returns
    true
    , this string is undefined.

Example

<script> pintrk( 'track', 'checkout', { value: 10.0, order_quantity: 2, currency: 'USD', event_id: 'eventId0001', line_items: [ { product_name: 'Parker Boots', product_id: '1414', product_price: 5.0, product_quantity: 1, }, { product_name: 'Parker Sandals', product_id: 'ABC', product_price: 5.0, product_quantity: 1, }, ], }, function (didInit, error) { if (!didInit) { console.log(error); } }, ); </script>

First party cookies

The Pinterest Tag can create and access cookies in a first party context on the partner’s site domain, providing better visibility into the Pinterest traffic they’re getting on their site.
You always have the option to delete first-party cookies by updating your base code to set the
fp_cookie
parameter to false.
You always have the option to delete first-party cookies by updating your base code to set the
fp_cookie
parameter to false.
<script> pintrk('load', '<tag_id>', { fp_cookie: false, em: '<email address>', }); </script>
The Pinterest Tag can also create and access
localstorage
in a first party context on the partner’s site domain. This also allows better visibility into the Pinterest traffic on your site.
You always have the option to delete first-party localstorage by updating your base code to set the
fp_localStorage
parameter to false.
You always have the option to delete first-party localstorage by updating your base code to set the
fp_localStorage
parameter to false.
<script> pintrk('load', '<tag_id>', { fp_localStorage: false, em: '<email address>', }); </script>

FAQs

Can I confirm my base code and event codes are firing after I implement them on my site?

Yes, your base code is correctly implemented if the tag shows a
verified
status in the conversion manager. Click into your Pinterest Conversion Tag to check that your event codes are firing - you’ll see a dashboard on the right for Tag Event History. Here you can see all the events that have fired with your Pinterest Conversion Tag. You can check when Pinterest last saw the event fire, and how many raw pixels fired for the event in the past 24 hours.

On pages where I want to track an event, do I still need to add the base code?

Yes, you need base code on every page where event code is added. On pages where you want to track conversions you should have two tags, the base code and the event code. Keep in mind your base code must run first before the event code runs.

Should I generate more than one Pinterest Conversion Tag?

No, you only need one Pinterest Conversion Tag, which will be your base code that you place across your entire site.

How long does it take to show a tag as verified?

Your tag should be verified within 3 hours of its first use.

Is the Pinterest Conversion Tag compatible with all tag managers?

Yes, the Pinterest Conversion Tag can be added as a custom tag in every tag manager.

Can I report on my own custom conversion types?

Yes, you can track your custom events in reports and use them for optimization. Make sure to map any custom event to a Pinterest standard event.

Do we provide separate reports if I add the same event code to multiple pages?

No, we cannot split out conversion event types by URL. For example, all pages of the partner's website with the page visit event code will roll up into one page visit conversion metric.

Can I add image tags only, without JavaScript?

Yes, but you can add only the image tag portion of the base and event code if you'd like. However, doing so will affect your campaign's targeting effectiveness. Our best practice is to add both JavaScript and image tags.

Enhanced match

Enhanced match is a slight modification of your Pinterest Tag that allows you to send back secure, hashed email addresses with your conversions. This allows you to see more conversions by tracking website actions when there's no Pinterest cookie present.

Enable Enhanced match in JavaScript

Add user data parameters, such
em
and
external_id
, to the
pintrk()
load function in the base code, as in the following example:
<script type="text/javascript"> !(function (e) { if (!window.pintrk) { window.pintrk = function () { window.pintrk.queue.push(Array.prototype.slice.call(arguments)); }; var n = window.pintrk; ((n.queue = []), (n.version = '3.0')); var t = document.createElement('script'); ((t.async = !0), (t.src = e)); var r = document.getElementsByTagName('script')[0]; r.parentNode.insertBefore(t, r); } })('https://s.pinimg.com/ct/core.js'); pintrk('load', '<YOUR_TAG_ID>', { em: '<email_address>', external_id: '<external_id>', }); </script>
Replace the placeholder text with corresponding values or variables on your website. The following example shows how the
pintrk()
function would appear with static values:
pintrk('load', '0123456789012', { em: 'name@example.com', external_id: '6a7a73766627eb611720883d5a11cc62b5bfee237b00a6658d78c50032ec4aee', });
To protect user privacy, the
<email_address>
passed to the pintrk command will be hashed before it is sent to Pinterest.
The JavaScript tag's
em
parameter accepts both hashed and un-hashed email addresses. We handle detection client-side to ensure security and proper storage.

Enable Enhanced match with img pixel

Enhanced match may also be used with the img tag.
Please Note! Partners that use the img tag will need to format and hash the email address and external ID themselves.
To do this, use the following steps:
  • Ensure that the email addresses are changed to all lower case and have any whitespace removed.
  • Hash the email addresses securely (we recommend using SHA-256, a type of the SHA-2 hashing function that uses 256-bit hash values).
  • Hash
    external_id
    values.
The formatted and hashed
email_address
and
external_id
should be added to every Pinterest img tag URL on your page with the
&pd[em]=<hashed_email_address>
and
&pd[em]=<external_id>
parameters. The
em
and
external_id
parameters should be added to both the base code and the event code img tags.
For example:
<noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=<YOUR_TAG_ID>&event=<EVENT_NAME>&pd[em]=<hashed_email_address>&pd<hashed_external_id>&noscript=1" /> </noscript>
Remember to replace the
<YOUR_TAG_ID>
<EVENT_NAME>
<hashed_email_address>
and
<external_id>
variables with corresponding values or variables on your website.
Inserting static values from the JavaScript example above, the img tag becomes:
<noscript> <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=0123456789012&event=pagevisit&pd[em]=b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514&pd[external_id]=6a7a73766627eb611720883d5a11cc62b5bfee237b00a6658d78c50032ec4aee&noscript=1" /> </noscript>

Note on hashing methods

Remember! Email addresses themselves are not case-sensitive; however, hashing functions are. If you are going to hash email addresses yourself before sending them to the tag, make sure to lowercase all email address values before hashing them.

Privacy FAQs

How are emails sent to Pinterest?

For privacy reasons, our JavaScript tag will hash any unhashed email address in the browser (using SHA-256) prior to sending it to Pinterest. The hashing process turns the value into a short text string that can’t be read by humans.
Pinterest also uses the secure https connection protocol standard to encrypt any data the tag transmits from a browser to our servers.
If a partner is using the img version of our tag, then they will need to hash the email address prior to passing it to the tag.
Note: Our img tag should not be used with an unhashed email address; we will not use or store unhashed values sent through an img tag.

Does Pinterest accept or store raw email addresses?

Pinterest allows partners to pass unhashed email addresses only through our Pinterest JavaScript tag. If our JavaScript tag detects a raw email address, the JavaScript will hash it before transmitting it to Pinterest. We do not store unhashed values.
Again: if you use our img tag you will need to hash the email address value securely before passing it to the tag. We recommend using SHA-256, as described above.

How does Pinterest use hashed email addresses? How long are they kept?

Once the tag transmits the email address to the Pinterest server, Pinterest checks to see if it is associated with an existing Pinterest account. Once this check is complete, we delete the email address value.

When are the hashed email addresses used?

A matched hashed email will be used for attribution only.

What are the Pinterest policies that govern using Enhanced match?

Your use of Enhanced match, like your use of the Pinterest tag generally, is governed by our policies on conversion tracking and audience targeting.
Was this page helpful?