ajax - Pinterest Addtocart event code | Shopify | Turbo Theme
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 anyone 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 (https://help.pinterest.com/en/business/article/shopify-and-pinterest-tag)
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. FYI I'm using the TURBO THEME.
Any help would be highly appreciated. Thanks!
Online Store -> Themes -> YOUR THEME -> Actions -> Edit Code -> in the left sidebar find "Snippets" -> product-form.liquid file
and then you can find button with add_to_cart class and add this onclick="pintrk('track', 'addtocart');" in the end of the tag <button here>
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.