Skip to main content

Hi Klaviyo community,

I have a problem with my "complete order now" button in my Abandoned Checkout Flow having the event variable {{ event.extra.checkout_url }}

The problem is that each time it sends to an actual profile who started checkout and they click it, they will be redirected to a http://none/ page and I have no idea what's wrong with my set-up or maybe if it's a Shopify issue.

I also tried using the {{ event.extra.responsive_checkout_url }} based on this thread:
https://community.klaviyo.com/custom-integrations-29/event-extra-checkout-url-doesn-t-work-383

But still, the same problem persists.

Even if I try to send a preview email, it just redirects to a "Sorry, that page isn't actually here." page.

Just dropping this question in case someone else had the same issue and found a way to solve it.

Thanks.

Hi @Memento_25,

Thanks for sharing this with us.

When you preview your email in the Klaviyo template editor, and search the event data for “checkout_url” are you seeing a legitimate URL?


If you’re seeing the https://none in the event data here (or nothing at all), then this is the web URL (or lack thereof) that is being sent over to us from Shopify. And yes, I recommend reaching out to them to better sort out next steps. 

As a potential workaround, in the meantime you could redirect to {{ organization.url }}/cart​ Although this is not the checkout page, it will redirect the user back to their cart.

I hope that’s helpful and thanks for being a community member.


Hi @Dov,

 

Thank you for pointing this out! It gave me clearer understanding of what’s happening.

 

I checked the checkout_url in the preview of the email editor and it looks like it’s empty as you’ve mentioned:

 

And I now found the reason why.

 

In our Shopify Store, there are two options when you want to proceed to checkout:

 

It’s either you:

(1) Add the item to the cart first then checkout.

(2) Click “Buy It Now” and immediately proceeds to the checkout page.

 

I’ve run a couple of tests and found out that when I do (1), it leads to a page with this link format:

And when the actual abandoned email sends out to a profile who started checkout, it all works fine.  checkout_URL is not empty and {{ event.extra.checkout_url }} works!

 

However when I do (2), it leads to a page with this link format:

 https://website.com/checkouts/bin/XXXXXXXXXXXXX/information

 

And there you go: checkout_URL is empty and {{ event.extra.checkout_url }} does NOT work and redirects the page to a blank page (none/) :(

 

Now my next question would be:

→ Is there a way to prevent any (2) events to NOT trigger the abandoned checkout flow and only accomodate (1) events?

 

I think this’ll be better so we avoid sending empty links to subscribers.

 

If there’s no other work around for this, then yeah, maybe I’ll just use this code: 

{{ organization.url }}/cart

...and lead them instead to their shopping cart instead of the checkout page.

 

Hoping to hear a response. Thanks!


Hi @Memento_25,

Ok that is some good sleuthing you’ve done to differentiate those buttons and their respective links. Thanks for doing that!

To address your question, Klaviyo flows only “come into play” after the Started Checkout event is logged (that occurs when the user clicks “proceed to payment” on the checkout page). That is to say, we don’t have a way to prevent our abandoned cart flow from triggering based on what button someone clicks in Shopify.

And yes the default cart code is a viable alternative….the one caveat to that approach is that the static “/cart” link will rely on cookies in the browser to populate the return to cart link for the user. Meaning, they would have to click on the button from the same device they built the cart on. The dynamic link is more reliable because it take a snapshot of the URL when the user proceeds to the payment page, that is “baked in” to the Klaviyo event. Even if they return to their cart from another device at a later time, we can still accurately rebuild their cart using our “snapshot” of the dynamic URL.

Another approach is to remove the “Buy it now” button entirely, and then you can use the default dynamic link {{ event.extra.checkout_url }} reliably in your emails.

I hope that’s helpful!

 


Hi @Dov,

 

Thanks for explaining the static /cart! I didn’t know that before.

 

I’ll be reaching out to our Shopify Web Dev team to see if there’s a way to format the abandoned link for the “Buy It Now” in the same way of that for the “Checkout” button so both will have checkout URLs whenever a Checkout Started event happens.

 

I’ll get back to this thread once we’re able to find a workaround.

 

If all else fail, I guess yeah, we’ll just turn off that button and leave the “Add To Cart” instead. :)

 

Appreciate your help, Dov!


Does it work @Memento_25 ?


Reply