Shopify Dawn Theme, Pinterest Tag "Add To Cart" and "Product ID" Event Doesn't Work

Please see the image below. Basically Pinterest Tag doesn’t work properly. I used Pinterest app on Shopify store. There is a guide https://help.pinterest.com/en/business/article/link-your-shopify-and-pinterest-accounts suggests to add this code but where how I couldn’t find.

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

Hi @Kutalp ,

I hope you are doing well.

That doc seems to be for vintage themes. If you are using Dawn, you can find the form in snippets/buy-buttons.liquid. Open that file and find id="ProductSubmitButton-{{ section_id }}, it is a button with type=“submit” like the following picture.

I hope this is useful to you! :hugs:

1 Like

I did the same before but it didn’t work, I will try again update here.

Event works but product id is missing, how can add it?

1 Like

Hi @Kutalp ,

I am not familiar with Pinterest but you can try to change the tracking code to this

onclick="pintrk('track', 'addtocart', {line_items: [{ product_id: '{{ product.id }}'}]});"

If our suggestion is helpful, can you kindly give us a like? :hugs: This can be a reference for other merchants if they have an issue like you and greatly motivate us to contribute to our community. Thanks in advance. :heart_eyes: