Skip to main content

I have been using the code snippet below to include recently viewed items in a campaign email. The code does work to show the product image, name and price. But it doesn’t link to the products on the website. I really need the url link to work so the email recipient can click on the product and directly to it on our website.

 

I don’t have an event metric to use and am instead relying on the code to deliver results. Can anyone offer any suggestions for how to get the product url to link properly?

thanks for your help!


 


 

Hi @cpattersom,

Thanks for sharing this question with our community.

Have a look at the item URL code you have pasted in your Shopify account for the Viewed Product metric. We are pulling the item URL directly from the Viewed Product event on the profile for recently viewed items, and that is a direct consequence of the snippet code. You may need to update the URL in your recently viewed item snippet to item.URL.

I hope that’s helpful.


Thank you so much for the tip Dov. I looked at our Viewed Part and Viewed Product metrics and I see that the code is literally using URL instead of Url. When I corrected the spelling/syntax it worked. Such a simple solution!

Your help is much appreciated!


Reply