How to add the Pinterest tag to your Shopify store manually

The Pinterest tag is a piece of JavaScript code you put on your website to gather conversion insights and build audiences to target based on actions they’ve taken on your site.

If you are a user of Shopify platform, following the below steps to add the Pinterest tag to Shopify manually.

Step 1: Base code

  • From your Shopify admin, click Online Store and then Themes​.
  • Navigate to the theme you want to edit and click Actions then Edit Code.
  • In the Layout directory, click theme.liquid.
  • Scroll until you see </head> and paste this code above it:
  • Replace YOUR_TAG_ID with your own unique tag ID.
  • To find this, navigate to Ads Manager and click on Ads, then find Conversion Tracking and click Generate Pinterest Tag.
  • Navigate to your conversion tracking overview and find the details section.
  • Copy the 13 digit number below Unique Tag ID and paste it in place of YOUR_TAG_ID in the code.

Step 2: Checkout code

  • From your Shopify admin, click Settings and then click Checkout.
  • In the Order processing section, find the Additional scripts text box.
  • Paste the following tracking code into the text box; if there is already code in this box, paste your tracking code after it.
  • Remember to replace YOUR_TAG_ID with the unique tag ID that was generated in Ads Manager.

Step 3: Add to cart code

  • From your Shopify admin, click Online Store then Themes.
  • In the current theme you’re using, click Actions and Edit code.
  • Under Templates look for code files named product.liquid or product-template.liquid or product-form.liquid and open it. Note that this may vary depending on the theme you have installed, but it’s most common to see add to cart button code in the products.liquid file or equivalent.
  • Search the file for addtocart.
  • Place the following code within the ending caret of the <button> or <input> element.
  • Click Save and you are done.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *