Pinterest conversion tracking codes issue

Pinterest conversion tracking codes issue

1 0 0

Hi all!

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) :


In my current code that I have in my product.liquid I couldn't find addtocart section where I need to input the Pinterest code. I talked to a support agent on chat and he pointed me out here.  FYI Im using the Prestige theme.

If there is more info you need let me know. Any help would be highly appreciated. Thanks!

Replies 3 (3)

Shopify Partner
449 46 126


I'm not sure if my solution is relevant to your Prestige theme, however, you can try this: 

1. Instead of product.liquid file, go to another file - product-template.liquid

2. Then, in the code find this class: data-add-to-cart (this class is added to the button "add to cart") - either by holding command+f or control+f. 

3. If you find the class and the button, place your code before the ending caret of the <button>.


Let me know if this works.



Send me a link to your store to and I'll help you out.
For more info what I do, visit my agency website or my personal website

2 0 2

Hey there! Had the same issue and I spent 2 hours until I found it, you have to search product-form.liquid on the Snippets section.

Then you ctrl+F and search:

<button type="submit" class="ProductForm__AddToCart Button

Once you have it you should add onclick="pintrk('track', 'addtocart');" to the code so it will look like:

<button onclick="pintrk('track', 'addtocart');" type="submit" class="ProductForm__AddToCart Button...


1 0 0

Hi, thanks for this. I managed to find the product-form.liquid part and when I click control+F in to searchbar, I can't seem to find anything with the button type = "submit" part, It only shows -
<button type="button" class="VariantSelector__Button Button Button--primary Button--fu" , and all the other ones without any part.


It's really annoying haha, been trying for hours, and the problem is we used Maestroos support page, it says to add a different piece of code in the custom.js part of Prestige, but when saved it still does not reflect in Pinterest that we added the "add to cart' check event. Wondering would be able to help advise at all?