Solved

How to add "Add to Cart" snippet with Shopify Booster Theme?

  • 19 April 2021
  • 3 replies
  • 320 views

Badge +2

I tried many ways to setup “Add to cart” snippet with my store (using Shopify Booster Theme), but it didn’t work. 

Please help me.

Thank you!

icon

Best answer by Dov 20 April 2021, 16:20

View original

3 replies

Userlevel 7
Badge +61

Hi @tonymac,

Thank you for sharing your question with the Klaviyo Community.

There are a few potential reasons for this issue. Can you try the steps outlined in the post below? This post includes a few different recommendations to resolve the issue.

 There is another thread below with a solution for the “Turbo” theme that you may find applicable to your theme as well

 

Thanks and please do let me know if you’re still having trouble after reviewing these posts.

Badge +2

I asked the technician of Booster Theme, but they couldn't solve it.
Does anyone here have the same issue?

I tried use “id” or “class” follow this way: https://help.klaviyo.com/hc/en-us/articles/115001396711-How-to-Create-a-Custom-Added-to-Cart-Event-for-Shopify

But it didn’t work...

Userlevel 7
Badge +61

Hi @tonymac,

Thank you for following up on the thread with your reply.

If you have confirmed that the class/id of the button matches what you have pasted into the product.liquid file, keep in mind you will also have to add a discrete item to your cart after you have self-identified your browser in order to log an Added to Cart event. Self-identifying the browser can be achieved by following the instructions here. Only after this step is done will an Added to Cart metric appear under Analytics > Metrics in Klaviyo after you add an item to your cart.

Also, you must already have Viewed Product tracking installed in order for the Added to Cart event to appear and function. The Viewed Product snippet must be installed above the Added to Cart snippet in the code for your website. We have more details in our article on this topic here.

Lastly, if you pasted the “Viewed Product” file in multiple product.liquid files, (i.e. custom product.liquid files), you would also have to add the Added to Cart code snippet to these files.

If you are still having trouble after running through these steps, can you show me screenshots of the button class/id within the product.liquid file and the class/id you have for the “add to cart” button on your site?

Thanks, and have a great day.

Reply