Why is my link for Abandoned Cart taking me to my homepage instead?

  • 22 July 2021
  • 8 replies

Badge +3



I am wondering how I can add a link (not a button) to my abandoned cart flow that would take the email recipient back to their cart. I see that Klaviyo allows you to do this for a button, but not sure how to do it with a particular link.


Best answer by Dov 23 July 2021, 15:41

View original

8 replies

Userlevel 7
Badge +61

Hello @drewpac,

Thank you for sharing this question with the Community.

The solution is to hyperlink a piece of text and insert the Klaviyo tag for return to cart in the URL section of the modal. You’ll find the correct tag to add to the URL section by clicking on the button of the abandoned cart flow. For Shopify this tag is: 

{{ event.extra.checkout_url}}

But for other integrations, this tag may be different. You can also find the correct tag to link back to the cart by clicking the Preview button on the left-hand side and searching for the return to cart URL.

You can insert this tag into a piece of text by following the steps in the below thread or looking at the screenshot below outlining the steps.

This thread uses the example of a table block, the same steps would also apply to a text block except you would skip step 1 because “Rows” doesn’t exist for text blocks.

I hope that is helpful!

Badge +3

Great, thanks so much!!

Userlevel 7
Badge +61

You’re welcome @drewpac! Glad this was helpful.

Thanks for being a member of our Community.

Badge +1

I tried this and unfortunately when I tested it, the link just reverts back to my home page on the website.  I copied & pasted the code exactly as you have it above.  What am I doing wrong?


Hello, the same as @WendyA here, i tried copied and pasted but it gets me to my front page 

Userlevel 7
Badge +60

Hi @WendyA and @charmelingerie_official


Thanks for bringing this to our attention! When you are testing this, are you previewing it as someone who has taken the trigger flow action recently so there is correct event data to pull? 


If you are using Shopify, and trying to use a link vs a button in your Abandoned Checkout Flow, then it should be noted that the checkout URL we use in the Klaviyo flow email comes directly from Shopify, not Klaviyo.


Shopify is aware and working to resolve these known issues on their end. The most recent update was made as of November 3, 2022 and this recent fix from Shopify should reduce the number of instances where Checkout URLs redirect to a “Something went wrong” error page. The result is that cases that would have previously redirected to a “Something went wrong” error page are now redirecting to the website homepage instead.


Most of these cases are specific to customers who have proceeded to place their order and therefore have no reason to click on a recover cart URL. For this reason it is very important to have  the Flow Filter in place > Person has placed order > zero times > since starting this flow. 


It should also be noted that if you are using an app within Shopify that customizes the checkout page or customizes the post-purchase page, that this app could also potentially be conflicting with Shopify's ability to properly generate a recover cart URL. 



Userlevel 2
Badge +6

I was about to create a thread about the same problem, but I saw this one. Has anyone managed to resolve this issue, as I’m having the same problem.


Edit: I’ve previewed several profiles that have triggered the Checkout Started action recently as @Taylor Tarpley suggested, and it turns out that some profiles recover the cart, whilst others are redirected to the homepage. Could the occasions where the button redirects to the homepage be cases where customers have proceeded to place their order?

Userlevel 7
Badge +60

Hey @eCommetry,

Glad you referenced this post in another comment before. Just to make sure other members who find either one of these posts on the subject of the checkout URL, I’ve included the other thread below:

Hey @eCommetry,

Glad you were able to dig into this further on your own. You’re assumption is absolutely correct!

Myself and @In the Inbox spoke about this sort of experience in the threads below:

To sum it up, our Checkout Started event will record every time someone has triggered it - including those who have completed their purchase. All our email template preview tool does is populate the email with the data found in the event. When users have completed their purchase their checkout page is would be emptied and “completed”. Hence, why when previewing as a profile that has already completed your order, the URL does not dynamically redirect to their previously completed cached page.