Liquid, JavaScript, themes, sales channels
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!
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,
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!
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024