Pinterest Addtocart Event Code for Icon Theme

kiesha8185
Visitor
1 0 0

I'm trying to set up Pinterest conversion tracking codes, so I just pasted a Pinterest base tag & Checkout Event to the theme.liquid file & checkout settings, however, I also want to add the Add To Cart event code, but I was not able to do it with the help of the official instructions since I couldn't find a line of code where I needed to pass the Add to Cart code. Can you tell me exactly where I should paste the code?

Instructions that I was looking at were these (Step 3) : 

https://help.pinterest.com/en/business/article/shopify-and-pinterest-tag

In my current code that I have in my product.quick.liquid I couldn't find addtocart section where I need to input the Pinterest code. I'm using the Icon theme. Any help would be highly appreciated. Thanks!

Replies 2 (2)

Scott-Marshall
Excursionist
36 3 4

Hi @kiesha8185,

You'll need to add the following:

 

onclick="pintrk('track', 'addtocart');"

 

To the end of the "Add to cart" button somewhere within your theme, this button is typically found in the "product.liquid" template (or section) or within the "product-form.liquid" snippet. If you can let me know which theme you're currently running, I'd be happy to have a look at the code (if it's a free theme) to see where this code can be placed.

Cheers,

WeDoTheStuff
New Member
20 0 0

Hi @kiesha8185,

Our app will also fire the ATC events for you.

If you are having issues implementing your Pinterest pixel you can use our app.

A couple of clicks and you are good to go.

https://apps.shopify.com/pinterest-pixel-helper

Check it out!