Solved

Viewed Product Tracking for Non-eCommerce Site

  • 27 March 2023
  • 3 replies
  • 137 views

Badge +1

Hello,

 

We’ve recently integrated Klaviyo with one of our client’s WordPress site; however, they are not a Retail/E-commerce site, but from Loan Lender/Finance industry. They offer various types of loans and we’re hoping to track these different types of Loans as “Viewed Products”. 

 

Is this something we can accomplish for a non-eCommerce site? From what we’ve read through the help articles, Viewed Product tracking are usually enabled on e-commerce platform integrations, but this client is using WordPress and doesn’t use any e-commerce platforms.

 

We’d appreciate if you can share your insights and if this is possible, can you guide us through the process please? Thank you!

icon

Best answer by Brian Turcotte 3 April 2023, 17:33

View original

3 replies

Userlevel 5
Badge +28

Hi @paoladflow

Thanks for being a part of our community!

Currently, Klaviyo does not support the Viewed Product snippet on WordPress pages. As a workaround, you can manually add the script from the Klaviyo plugin located at includes/js/wck-viewed-product.js and add it to the product pages you would like to track.

You will want to identify the appropriate syntax to actually pull in the corresponding event variables, but this is the code you can use as a framework pulled from the Klaviyo plugin. You will want to identify the appropriate syntax to actually pull in the corresponding event variables, but this is the code you can use as a framework pulled from the Klaviyo plugin. 

<script type="text/javascript">
var _learnq = _learnq || [];
var item = {
'Title': {{}},
'ItemId': {{}},
'variantId': {{}},
'Categories': {{}},
'ImageUrl': {{}},
'Url': {{}},
'Metadata': {
'Price': {{}},
}
};

_learnq.push(['track', 'Viewed Product', item]);
_learnq.push(['trackViewedItem', item]);

</script>

Once you determine the appropriate syntax, you will replace the with that variable. I hope this helps!

~Chloe
 

Badge +1

Hi @chloe.strange,

 

Thank you for your response. Is it possible to have this Viewed Product tracking code added through GTM instead of adding to the product pages? 

 

Regards,

Paola

Userlevel 7
Badge +36

Hi @paoladflow!

 

Here’s our Help Center Article on this topic where it explains the recommended way to add Viewed Product tracking via GTM:

 

I hope this helps, and thanks for using the Community!

- Brian

Reply