Skip to main content

Hi,

 

I can’t seem to get my dynamic image block to show the product in my Browse Abandonment email.

I have tried the solution in this Post, but it didn’t work. The box shows but no product. See image below.

 

Using the proper code “{{ event.ImageURL }}” the image or box outline doesn’t show. However, the price works fine - See image below.

I have checked my Viewed Product, and it is firing, with metrics showing.

 

 

Is it possible that the “viewed product” script is outdated, and needs updating?

I am with Shift4Shop, and the original script was installed by Klaviyo support a few years ago.

 

Thanks.

 

Hi there @BTO

 

Happy to help! 

 

It appears that there are very few event properties being sent over in your event data for your integration’s Viewed Product metric, so it might be possible that the product image information is not being sent as well. This leads me to believe there might be something fishy in the code setup for the Viewed Product metric as Klaviyo doesn’t change any information in an email, but dynamically reflects it from your site!

 

I would inspect the page view source code on your product page and compare what you see in your Viewed Product script against what is outlined in your integration’s documentation set up page to solve this issue! This is what your code should look like for reference! 

script type="text/javascript">
var _learnq = _learnq || n];

// Track each product view.
if ('vprice]' !== '(' + 'price]') {
_learnq.push( 'track', 'Viewed Product', {
ProductID: "rid]",
Name: "]name]",
Description: "/description]",
URL: olocation.protocol, '//', location.host, location.pathname].join(''),
Categories: " catid]",
ImageURL: Price: parseFloat("cprice]".slice(1), 10)
}]);
}</script>

 

Hope this helps!

-Taylor 


Hi @Taylor Tarpley ,

 

Below is my original code that was installed by Klaviyo support over 2 years ago. There seem to be some slight differences.

I installed the code from the documentation, and still no change.

Do you know if this code was developed by Klaviyo, or by the Shift4Shop?

 

Thanks again for your assistance.

 

<script type="text/javascript">
//<!tCDATAA
var _learnq = _learnq || |]; // Track each product view. if (' price]' !== '=' + 'price]') { _learnq.push(s'track', 'Viewed Product', { ProductID: ":id]", Name: ":name]", Description: ":description]", URL: Llocation.protocol, '//', location.host, location.pathname].join(''), Categories: ":catid]", ImageURL: Llocation.protocol, '//', location.host, '/ image1]'].join(''), Price: parseFloat("tprice]".slice(1), 10) }]); }
//]]>
</script>

 

 


Hi there @BTO

 

This is Klaviyo’s code for our Viewed Product metric. 

 

I can confirm that I looked at a product on your site and can still see a different Viewed Product script then what you share above and in our documentation, which is probably the issue!

 

I would recommend stripping the old script and adding what I linked above. 

 

-Taylor 


Hi @Taylor Tarpley,

 

Thanks for seeing this.

I had put the new script in, but for some reason it is not saving, so I have contacted Shift4Shop, as there seems to be a problem on their side.

I will update you when rectified.

 

Thanks again.

 


Hi @Taylor Tarpley,

 

My script was fixed today, and so far it seems to be almost working on the Browse Abandonment Flow, with one exception.

I have tested it through preview mode and email tests. While some have populated and others haven’t.

The strange thing is, the ones that have populated are not registered customers, or had their profiles registered before. Some of the ones that are registered with a profile, or have been on the site before, are not fully populating. They all have emails as well.

What could be causing this?

Thanks again.

 


Reply