Skip to main content
Solved

Abandoned checkout url link redirects to home page if not opened in the same window.


Forum|alt.badge.img+14

Hello,

The issue I'm facing is that the dynamic checkout URL in the received checkout email redirects to the homepage instead of the product checkout page when anyone triggers the abandoned checkout process in one Google window and receives the abandoned checkout email in a different Google window.

However, the same window redirects to the appropriate checkout product page if the abandon checkout is triggered and the received checkout email is opened in the same window.

Checkout url: {{ event.extra.checkout_url}}

This is my first time facing such an issue. Any help is appreciated.

Thank you!

Best answer by eCom2Win_Agency

Hey, I understand your frustration.

The problem you're describing happens because the checkout URL is session-specific. When the abandoned checkout email is opened in a different browser window, it doesn't have the session data from the first window, so it redirects to the homepage instead.

Verify the Correct URL: Ensure that the checkout URL tag you are using in the email is correct. You can do this by previewing the email in Klaviyo and checking the dynamic data being pulled. This ensures that the correct link is used for each abandoned cart email. Here are some of the posts on the forum that have dealt with a similar issue:​ (Klaviyo Forum)​​ (Klaviyo Forum)​.

Custom Script or Persistent Links: This could involve creating a script that preserves the session data across different browser windows. One method is using Shopify’s Cart Permalinks, which allows you to construct a cart URL that remains valid across sessions. These might offer some additional insight as well:​ (Klaviyo Forum)​​ (Klaviyo Forum)​.


Hope this helps :)

View original
Did this topic or the replies in the thread help you find an answer to your question?

4 replies

eCom2Win_Agency
Problem Solver IV
Forum|alt.badge.img+7

Hey, I understand your frustration.

The problem you're describing happens because the checkout URL is session-specific. When the abandoned checkout email is opened in a different browser window, it doesn't have the session data from the first window, so it redirects to the homepage instead.

Verify the Correct URL: Ensure that the checkout URL tag you are using in the email is correct. You can do this by previewing the email in Klaviyo and checking the dynamic data being pulled. This ensures that the correct link is used for each abandoned cart email. Here are some of the posts on the forum that have dealt with a similar issue:​ (Klaviyo Forum)​​ (Klaviyo Forum)​.

Custom Script or Persistent Links: This could involve creating a script that preserves the session data across different browser windows. One method is using Shopify’s Cart Permalinks, which allows you to construct a cart URL that remains valid across sessions. These might offer some additional insight as well:​ (Klaviyo Forum)​​ (Klaviyo Forum)​.


Hope this helps :)


Forum|alt.badge.img+14
  • Author
  • Partner
  • 44 replies
  • May 28, 2024

Thank you @eCom2Win_Marketing for sharing the post on the custom scripts. I have found a custom cart link that I have modified according to the checkout trigger, and it worked.


If you’re also struggling this this issue, Littledata’s improved Added to Cart and Checkout Started triggers include a CheckoutURL which maps to Shopify’s cart permalink, so users can instantly checkout when clicking through on any device.


  • Contributor I
  • 1 reply
  • February 27, 2025

Hey All! 
We recently experienced the same issue and Klaviyo Support crew able to help us with a solution  with the code below:

{% with event.extra.line_items as items %}{{ organization.url|trim_slash }}/cart/{% for item in items %}{{ item.variant_id }}:{{ item.quantity|floatformat:'0' }}{% if not forloop.last %},{% endif %}{% endfor %}{% endwith %}? checkout%5Bemail%5D={{ email }}

Try it out crew & it should work & bring you all back to the CHECKOUT page without any Home/404 redirections!