IMG tag

The <img> 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 should remove the <noscript> tags since you won’t be using javascript. We recommend you include both the JavaScript and image tag portions of the event code, as this provides for better user targeting.

<img> tag Base Code

We recommend placing the base code on every page of your site, even if you’re using the <img> tag. This will allow you to capture data from all traffic on your site. The <img> tag version of the base code is part of the entire code generated in Ads Manager, see below for an example of the <img> Pinterest tag base code.

<img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=init&noscript=1" />

Be sure to place the base code between the <head> and </head> tags in HTML.

Event data in the <img> tag

You have the option to include event data in the <img> tag. See the example below for a checkout event with event data in the <img> tag.

 <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[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"/>

The code below shows what the <img> tag above looks like when we separate the data parameters for better readability. However, be aware that adding whitespace in the src attribute will break the code.

 <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[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"/>

<img> tag Copy & paste event code examples

This section contains an example of every event type in a complete, copyable format that you can place directly on your website. Each example has the event data needed to get started tracking activity on your website.

Note that 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 because the value of each order placed on your website will vary depending on what a user buys. However, you might assign a static value to the event data lead_type if it is placed only on one specific page.

Checkout

 

 <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&noscript=1" />

Event data: value, order_quantity, and currency.

Make sure to input the correct currency code for your website.

AddToCart

 

 <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]=2&noscript=1" />

Event data: value, order_quantity, and currency. Make sure to input the correct currency code for your website.

Pagevisit

 

 <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=pagevisit&noscript=1" />

Event data: none

Signup

 

 <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=signup&noscript=1" />

Event data: none

WatchVideo

 

 <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" />

Event data: video_title

Lead

 

 <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" />

Event data: lead_type

Search

 

 <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" />

Event data: search_query

ViewCategory

 

 <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=viewcategory&noscript=1" />

Event data: none

Custom

The event type must be called custom—otherwise, the conversions tracked by the tag won't be reported in Ads Manager.

 <img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=custom&noscript=1" />

Event data: none

Still need help?
Contact us