Install Pinterest tag script

Modified on Tue, 22 Mar 2022 at 06:06 PM

The Pinterest tag is a piece of code that you add to your website which lets Pinterest track visitors to your site as well as the actions they take on your site after seeing your Pinterest ad. You can generate this code from your Pinterest settings. 

To implement the Pinterest tag

In Pinterest 

  • Sign in to your Pinterest account and go to your settings.
  • Find the Claim section. Enter your Pattern site URL and then click Claim.
  • Copy the entire tag that displays in the pop-up window.

In Valigara

  • Go to VSite settings -> Basic tab
  • Block "Other" -> Header script (visible in Advanced view)
  • Add the script code below 
    • Replace XXXXXXXXXXX with your Pinterest Tag ID (it will look like 1234567890 ) 

More information on the Pinterest site

<!-- Pinterest Tag -->
!function(e){if(!window.pintrk){window.pintrk = function () {
pintrk('load', 'XXXXXXXXXXX', {em: '<user_email_address>'});
<img height="1" width="1" style="display:none;" alt=""
  src="[em]=<hashed_email_address>&noscript=1" />
   pintrk('track', 'pagevisit', {
   product_id: 'data-product-id'
   pintrk('track', 'addtocart', {
   product_id: 'data-product-id'
 pintrk('track', 'checkout', {
   value: 116,
   order_quantity: 2,
   currency: 'USD',
   line_items: [
       product_name: 'product-title',
       product_id: 'data-product-id',
       product_price: 'price-col',
       product_quantity: 'quantity-col'
   <img height="1" width="1" style="display:none;" alt="" src="" />
   <img height="1" width="1" style="display:none;" alt="" src="" />
<img height="1" width="1" style="display:none;" alt="" src="" />
<!-- end Pinterest Tag -->

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article