[How To] Add A Shopify Checkout to Your Unbounce Landing Page


Userlevel 7
Badge +4

Customers have been coming to us with a one main recurring challenge. Some are acutely aware of their problem, others simply blame it on their ads. The problem, we knew, was that their product pages weren’t converting as well as they should.

Our solution was both budget-friendly and proven to increase conversion rates, that is, ecommerce landing pages. This solution allowed us to quickly A/B test product landing pages and customize our pages based on our audiences, without having to deep dive into our customers’ websites and pitch them expensive redos.

Initially, we had to customize the Shopify embed code to allow the checkout drawer to appear on the unbounce landing page, as well as have the button appear in multiple sections. Thankfully Shopify has improved their button since and these functionalities are now possible with their base embed code.

🚨
This is not an official Unbounce feature. This functionality is based entirely on third party code, and has only been tested in limited applications. Since this isn’t a supported Unbounce feature, our support team will be unable to assist if things go awry. So if you are not comfortable with HTML, Javascript and CSS, please consider consulting an experienced developer.

Heads up 👉 this script requires a shopify account.


Step 1. Log Into Shopify

Log into your shopify store and install the “Buy Button” app from the app store (free).

Step 2. Generate Buy Button Embed Code

  1. Click on “select product”
  2. Select the product you’d like the button to direct to
  3. Style the button to match your landing page design
  4. Action on click: select “add to cart”
  5. Hit Generate code
  6. Hit Copy embed code to clipboard

Step 3. Paste embed code into Unbounce Page

  1. Create a custom HTML block & copy paste the embed code
  2. Position the HTML block on desktop & mobile

Step 4 (Optional). Allow users to checkout in the same window

By default, the Shopify button will open a new window for your checkout process. We find that this isn’t ideal, specifically on mobile, where certain users may have difficulty going back to the page.

If you’d like users to checkout in the same window, replace the following line of code:

<script type="text/javascript">

with

<script data-shopify-buy-ui="">
window.open = function (open) {
return function (url, name, features) {
// Pass through non-shopify URLS
if (url.indexOf("myshopify") < 0) {
return open.call(window, url, name, features);
}
// Use current window
console.log("Redirecting to:", url);
window.location.href = url;
return null;
};
}(window.open);

That’s it! Make sure to publish + test on Desktop & Mobile 🚀

Custom current-window checkout:

Default checkout:

Want to take your Unbounce landing pages + convertables to the next level?
:spinbounce: Check out the Ultimate List of Unbounce Tips, Scripts & Hacks


50 replies

This is GOLD! Thank you @Stefano!

Badge +2

🙌 “Small” disclosure! This simple addition to our e-commerce landing pages has in some cases doubled our conversion rate! We’ll have a case study going up shortly telling you the entire story. Stay tuned!

This is very cool indeed. I wish there is a similar way to hack woocommerce.

Userlevel 7
Badge +1

WOOHOO!! :partyparrot:

Full breakdown on our blog here:
https://unbounce.com/landing-pages/shopify-landing-page/

Userlevel 7
Badge +1

@Stefano!! THIS. IS. HUGE!!! I remember @waseembashir, @Ashwin_Satyanarayana, @Adam_Lundquist, and @MPatterson22 have mentioned their marketing stacks involving ecommerce experiences a while back. This may be helpful for them to know about as well.

Nicely done!!! 💪

Userlevel 7
Badge +3

Hey @gijeet,

I’m really not sure where your confusion comes from since the post here is a how to on adding a shopify checkout to your Unbounce page.

Paypal is essentially a payment processor while Shopify is an eCommerce platform. Two completely different things.

The intended purpose of the post is to help existing Shopify store owners build dedicated landing pages for their products all the while keeping consistency with their brand and checkout flow.

If you don’t already have a Shopify store, it makes little sense to open one up just to be able to accept payments so that’s where PayPal and a slew of other options come in.

Best,
Hristian

Badge +2

Hi @gijeet, @Hristian beat me to it. His response is 10/10.

Badge +2

Fairly certain this is a Shopify issue, mainly because your cart seems to be functioning properly!

Badge +1

Update: As of August 2022 the Shopify Buy Button sales channel offers same window checkouts as a built-in feature.

 

Badge +2

We can always try! It would be a much more custom approach.

Yes, please! If you check Leadpages, they have templates and integration with Shopify (which I use), and it’s making me real tempted to use their service.

I think that a ecommerce sales funnel landing page function would really be good–right now there’s just two for Shopify that are good (funnel buildr and zipify) and both pretty pricey.

thanks,
tom

Badge +2

It might be. Try to publish (make sure you’re not sending paid traffic to the page). If it doesn’t work send me a screen grab of what’s happening and of the script you copy pasted 🙂

Badge +2

Hi @Justin1, it’s not a Shopify app. It’s a functionality that Shopify offers. You can read more about it here:

Badge +2

Hi @Khorshed_Alam! I would definitely recommend Unbounce. However perhaps it’s better to maintain the uploading component in your store, in order to keep all data centralized in one place. This depends on how your are currently setup. Can I have a look at the store/website?

Hi all - any advice on if this is possible to implement wit the smart traffic feature? I have had promising results from smart traffic, and I want to implement a variant that uses this checkout. The problem is that Unbounce doesn’t count conversions.

Is there a way to tweak the javascript so Unbounce will count click throughs to initiated checkout as a conversion?

Badge +2

You can do that if you have access to the liquid for Shopify’s checkout/purchase pages. You would add Unbounce’s external tracking script. You would need to be on Shopify’s Advanced or Plus plan in order to be able to do that however.

Hi All,

I’ve used this functionality with great success, however, our company has decided to change storefronts from Shopify to WooCommerce. Do any of you know how to replicate this functionality for Woo?

Thanks in advance!

Badge +2

Hi @Brummsy, glad to hear it worked well for you! For Woo we usually create a unique checkout URL and create a click-through CTA on the landing page.

@Jonathan using a custom html for “add to cart” button on an unbounce page. After clicking “add to cart”, product appears in the cart. When hitting checkout, I get the notification “store.myshopify.com refused to connect”. Is this a shopify or unbounce issue?

Hi @Stefano @Jonathan I can’t seem to find this buy button app on the Shopify store! Did it get taken down? If so, do you know of a workaround? I’d love to be able to keep as much of the customer journey on the landing page to remove as many steps as possible and this seems like a good possible solution.

This is getting closer to exactly what I’m looking for. BUT, is there a way to have the Add to Cart button then take you to a second page for an Upsell Product? Then to a third page for a Downsell Product? Then go to check out.

Appreciate the response on this! Thanks!

tom

Badge +2

Hi @americancolors! Good Q! We have not tried that YET, but we are planning on finding a workaround for it. Theoretically it’s possible. Would you like me to ping you as soon as we test this out?

Okay Jonathan,
I tried the script replacement as in the above. Everything works UNTIL I try to check out (granted this is in preview mode). Do I need to publish it in order to confirm that checkout and beyond pages work?

Thank you!
tom

@stefano

Great concept but I can’t find that Shopify App?

I found one that’s called “Buy Button Channel” by Shopify on https://apps.shopify.com/collections/made-by-shopify

But, it doesn’t look like the one in your screenshot and only has 2 stars?!

This is awesome, but how did you guys track the purchase conversions from your Shopify thank you page?

Reply