Solved

Dynamic Image Not Showing in Browse Abandonment Email

  • 14 February 2024
  • 5 replies
  • 94 views

Badge +5
  • Contributor IV
  • 10 replies

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.

 

icon

Best answer by Taylor Tarpley 15 February 2024, 22:39

View original

5 replies

Userlevel 7
Badge +60

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 || [];

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

 

Hope this helps!

-Taylor 

Badge +5

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">
//<![CDATA[
var _learnq = _learnq || []; // Track each product view. if ('[price]' !== '[' + 'price]') { _learnq.push(['track', 'Viewed Product', { ProductID: "[id]", Name: "[name]", Description: "[description]", URL: [location.protocol, '//', location.host, location.pathname].join(''), Categories: "[catid]", ImageURL: [location.protocol, '//', location.host, '/[image1]'].join(''), Price: parseFloat("[price]".slice(1), 10) }]); }
//]]>
</script>

 

 

Userlevel 7
Badge +60

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 

Badge +5

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.

 

Badge +5

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