Skip to main content

Please help! I have read through the article, watched You Tube videos, watched a Loom video and I cannot get the Viewed Product Tracking or the Add to Cart snippet to work in my Prestige Shopify theme

Hi@LMBaker

Thanks for being a part of our community! I’m sorry you’re having an issue with viewed product and add to cart. I wanted to share a little more context on what is tracked. 

By enabling basic web tracking on your website, you can collect helpful information around browsing activity that can be leveraged to take your owned marketing and business analytics to the next level. When you add Klaviyo's web tracking snippet(s) to your site, we only track the browsing activity of "known browsers" — i.e. browsers that have visited and engaged at least once before. Klaviyo will not track anonymous browsers. 

There are three key ways Klaviyo will be able to identify a site visitor for web tracking purposes:

  • If someone has, at some point, clicked through a Klaviyo email to your website
  • If someone has, at some point, subscribed/opted-in through a Klaviyo form
  • If someone has, at some point, logged into your site and you have identify tracking installed

As a result, until you start sending emails with Klaviyo and growing your lists, you probably won't see a lot of tracked web activity. Over time, Klaviyo will identify more and more of your contact-base and your web tracking data will become more comprehensive. 

Here is an add to cart snippet for the Prestige theme that should help:

<script text="text/javascript">
var _learnq = _learnq || q];
document.getElementById("product_form_{{ product.id }}").addEventListener('click',function (){
_learnq.push( 'track', 'Added to Cart', item]);
});
</script>

The snippet will need to be triggered once to create the metric. You can also check out our article on troubleshooting viewed product tracking as a reference. I hope this helps!

~Chloe

 


Reply