Pinterest tag implementation guide

Pinterest tag implementation guide
1. Base code
Event code
2.1 Events
2.2 Event code template
2.3 Event code placement
2.4 Event data in Javascript
. Event data in the tag
Value and quantity
3. Example tag drafts
3.1 Copy/Paste Event Code Examples
. FAQs
. Callback
The Pinterest tag allows you to track actions people take on your website after viewing your Promoted
Pin. You can use this information to measure return on ad spend (RoAS) and create audiences to target
on your Promoted Pins.
The Pinterest tag has two components:
● The
base codethat you place on every page on your website
● The
event codethat you place on pages where you want to track conversions, in addition to the
base code
1. Base code
The base code is the primary code for the Pinterest Tag which allows you to build audiences, and the
base code is required for conversion tracking. The base code is generated in the Conversion Manager at contains your unique tag ID. You only need to generate
the base code once for your account.
After you generate your base code, it is a best practice to place the code across every page of your
website. Placing the code across your entire site allows you to create audience lists for your entire
website. At minimum, you need to place the base code on any page where you want to track conversions.
Be sure to place the base code between the
and tags in HTML. The base code must
appear only once on a page and must run before the subsequent event code. See below for an example
of the Pinterest tag base code.
Base code template

*My Page and My Page Category are optional to rename
In practice, you should retrieve your personalized base code from our UI, or API. It is not recommended
to copy and paste from this guide. When you obtain your base code from our UI, or API, it will have your
unique Pinterest Tag ID
inserted in the proper locations of the code, where you see ‘YourTagID’ in red in
the above example.
2. Event code
2.1. Events
To track conversions you must add event code in addition to the base code.
The table below shows the events that you can track with the Pinterest tag. At this time we offer 9 event
types (shown below) for conversion reporting. Any additional Partner-defined events can be used to
create audiences, but they won’t be available in conversion reporting.

Event Purpose Audience
PageVisit Track people who view primary pages, such as
product pages and article pages
ViewCategory Track people who view category pages
Search Track people who perform searches on your
website to look for specific products or store
AddToCart Track people who add items to shopping carts
Checkout Track people who complete transactions
WatchVideo Track people who watch videos
Signup Track people who sign up for your product or
Lead Track people who show interest in your product
or service
Custom Track a custom event. Use this event name to
track a special event that you want to include in
your conversion reporting
Add any additional event that you’ve defined for
the purpose of audience targeting. Unique
events aren’t available for conversion reporting.
Keep in mind that whitespace will be trimmed
from raw event names passed through the tag.

2.2 Event code template
See below for our event code template. For conversion tracking and reporting, you must specify one of
the nine event types in the event code template as shown in blue
. This example is tracking the event
checkout.​ ​ You must also replace YourTagIDwith your Pinterest Tag ID from your base code.

If you want to track a different event, just replace the instances of checkout with the event type you want
to track. Keep in mind you’ll need to adjust the event type in two places: in the Javascript code (between
tags) and in the tag.
2.3 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, whereas event code only needs to be
placed on pages where you want to track conversions. The base code must run before the event code.
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 and checkout event code between the
tags on your checkout confirmation page. This placement ensures that the codes run as soon
as the page is loaded.
On the other hand, if an event is triggered only after a user takes a specific action on the page, such as
clicking a button or submitting a form, then you need to make 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
2.4 Event data in Javascript
You can provide additional information about an event by attaching an object that contains event data.
Keep in mind we only offer reporting on
valueand order_quantityevent data at this time. Any
additional event data is available for audience targeting but is not available for conversion reporting.
In addition to what’s listed in the table below, you can create your own set of event data fields for
audience targeting.

Event data Sample value Audience
property Athleta
search_query boots
product_name* Parker Boots
product_id* 1414
product_category* Shoes
product_variant_id* 1414-Red
product_variant* Red
product_price*# 99.99
product_quantity*@ 1
product_brand* Parker
order_quantity@ 1
order_id X-151481
promo_code WINTER10
value# 100.00
currency USD$
video_title How to style your Parker Boots
lead_type Newsletter

​ ​ ​ ​ ​ ​ ​ ​​​*means the event data is in a line_itemsarray
@means the value should be be an integer
means the value should be a number (integer or floating point)
supported currency codes include USD, GBP, CAD, EUR, AUD, NZD
The example event code below tracks a
checkoutevent 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_quantityand valueare hardcoded, but you may want to pass back these values dynamically.
See section 2.6 for examples of dynamic value and quantity.

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.





2.5 Event data in the tag
In addition to event data in Javascript as shown in the section above, you can also optionally include
event data in the
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

Assignment status: Already Solved By Our Experts

(USA, AUS, UK & CA Ph. D. Writers)


Order from Australian Expert Writers
Best Australian Academic Writers


YOU MAY ALSO READ ...  Module 09 written assignment – hematologic disorder | pathophysiology