How to add the Pinterest tag to your Shopify store manually

Hura Product Showcase Builder

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.
Hura Theme Blocks

You may also like...

4 Responses

  1. Daniel says:

    Thank you. It worked! Only the 3. part is not working for me, i guess its my third party theme!

    Appreciate it

  2. yg says:

    Nice article thank you very much. Guys for those of you who are not filling comfortable dealing with code you can just use this App https://apps.shopify.com/pinterest-pixel-helper?ref=hura. And if anything not to your licking (unusual theme for example that needs adjustment) contact the support and we will take care of it

    • Joseph says:

      Hi
      what’s in it for you guys, with the app. Do you collect data this way?
      once the pixel is installed, can I remove the app again?

    • yg says:

      To be honest we still have not decided maybe some small monthly fee if shop can aford it like 5 dolars. The app only works if it’s installed of course but the good thing tha app does not mess with theme liquid so if uninstalled it leavs no trace

Leave a Reply

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