Question

trackViewedItem does not populate a product feed

  • 17 January 2024
  • 4 replies
  • 41 views

Badge +2

I’m trying to integrate Klaviyo with a custom built website. For Viewed Product, I’m trying to follow this guide https://developers.klaviyo.com/en/docs/guide_to_integrating_a_platform_without_a_pre_built_klaviyo_integration and also included trackViewedItem as the guide stated “Calling the Klaviyo object's trackViewedItem function below will populate a product feed of recently viewed products that can be included in emails.” However, even though viewed product event worked and also sync recently viewed products into user profile, there was no product feed creation for me to use in email template. This is what a profile look like with recently viewed products display but there is no product feed for me to use: 


Here this a part of my code on Google Tag Manager for Viewed Product:
var item = {
     "ProductName": HaravanAnalytics.meta.product.title,
     "ProductID": HaravanAnalytics.meta.product.selected_or_first_available_variant.id,
     "Price": price,
     "PriceNumber": priceNumber,
     "OldPrice": oldPrice,
     "OldPriceNumber": oldPriceNumber,
     "ImageURL": HaravanAnalytics.meta.product.imageUrl,
     "URL": window.location.href,
   };

   klaviyo.push(["track", "Viewed Product", item]);
    
   klaviyo.push(["trackViewedItem", {
     "Title": item.ProductName,
     "ItemId": item.ProductID,
     "ImageUrl": item.ImageURL,
     "Url": item.URL,
     "Metadata": {
       "Price": item.Price,
       "oldPrice": item.oldPrice
     }
   }]);


4 replies

Userlevel 7
Badge +36

Hi @alvin.nguyen!

I’m going to check on this internally and I’ll update the thread ASAP!

Best,

Brian

Userlevel 7
Badge +36

Hi @alvin.nguyen!

Would you be able to share a screenshot of the email template editor where the feed is missing?

Best,

Brian

Badge +2

Hi @alvin.nguyen!

Would you be able to share a screenshot of the email template editor where the feed is missing?

Best,

Brian

Hi Brian,

I want to ask if I have to import/connect product feed first if I want to use recently viewed item section in user profile as a feed, or that code snippet alone would create a product feed with recently viewed item for me.

 

As right now, I don’t have a product feed in Klaviyo yet and I’m assuming the trackViewedItem snippet from here https://developers.klaviyo.com/en/docs/guide_to_integrating_a_platform_without_a_pre_built_klaviyo_integration would automatically create a product feed with recently viewed item for me. Correct me if I’m wrong.

 

Thanks

Userlevel 7
Badge +36

Hi @alvin.nguyen!

My apologies for the delay here - you are correct, that snippet should automatically create a product feed, but you also then have to configure it according to these instructions:

 

- Brian

Reply