Since its inception, Shopify Scripts has enabled high-growth merchants to optimize and automate their ecommerce checkout in all sorts of ways.
Whether it’s offering …
- Automated discounts and promotions
- Precalculated shipping costs
- Free shipping thresholds
- Fewer clicks, steps, and screens
- Or, simply building trust
You can augment your store’s most critical moment to create an unforgettable customer experience … and see more conversions as a result.
In fact, Shopify Scripts — along with the ability to fully customize your ecommerce checkout and offer a mobile-first approach to shopping — enable you to head off the most common reasons for cart abandonment:
As Campus Protein founder and CEO Russell Saks says:
“Shopify Scripts have allowed us to build out features that we’ve always wanted, in a truly customized way.
“On the front end, ease of use for the customer is increasing, and on the backend we’re seeing that correlate into more conversions and orders. We see scripts as the missing piece to Shopify’s already robust platform.”
However, instead of just telling you about Shopify Scripts, I wanted to show you its power in action and offer ready-made code you can copy-and-paste then apply to your store today …
Ecommerce Checkout: 15 Optimizations with Shopify Scripts
- Storewide Discount
- Buy One, Get One Free
- First-time Customer Discount
- Percentage Off Least Expensive Item
- Tiered Pricing for Bulk Purchases
- Tiered Discounts by Spending Thresholds
- Free Gift with Purchase
- Free Standard Shipping for VIP Customers
- Fallback Shipping Rate for Calculated Carriers
- In-Store Pickup for Customers by Location
- Percentage Off Next Purchase If Accepted Marketing
- Provide Invoice for Wholesale Order
- Auto-Select Default Payment Method
- Disallow Discount Codes for a Sitewide Sale
- Calculate Value-Added Tax (VAT) Rates in Europe
At the end of this post, I’ve also put together a list of additional resources to guide you through implementation.
Not on Shopify Plus?
We’d love to talk to you about ecommerce automation and why the average Shopify Plus business is growing at 126% year-over-year.
1. Storewide Discount
Whether it’s a special holiday incentive or a flash sale to attract customers, nothing gets visitors more excited than a storewide discount. A sale like this becomes an event and (when used strategically) can attract visitors and turn them into buyers, and eventually convert them to loyal, repeat customers.
While the Script above is for 10% off, you can easily adjust it. Last Black Friday, Cyber Monday, Pura Vida Bracelets deactivated all other discounts — see number 14 for the deactivation Script — and went big with a sitewide 50% sale:
At checkout, Pura Vida combined their sale — which applied and displayed the discount automatically — with a countdown clock to add urgency:
In the words of Pura Vida Bracelets’ co-founder and CEO, Griffin Thall:
“If you feel that you’re not getting enough orders where an extra push on a percent or two is really going to move the needle, then maybe it’s not for you.
“But if you need to aggressively A/B test the checkout and push it to the next level, then Shopify Plus is the best.”
2. Buy One, Get One Free
Getting more than you bargained for is a wonderful feeling that creates joy in a buyer. Deep down, we all love free stuff. MMA warehouse combined their Buy One, Get One (BOGO) sale with a prominently-displayed countdown clock to add urgency.
The added value is obvious to the customer.
A free additional product can compel first and second-time buyers who are on the fence. As we’ve written before:
“At this moment your customer has only made one purchase and the chance of them making a second is just 27%. However, if you can achieve that second purchase, the chance they will make a third jumps significantly to 45%.”
3. First-Time Customer Discount
It takes a visitor about 13 milliseconds to judge your site, so give the first-timers a chance to get a deal. A quick discount — e.g., 20% off the least expensive item — is a great way to entice and conclude a purchase, but you’ve got to get that customer through the checkout.
Evy’s Tree is a luxury hoodie company that wanted to make checking out easier by reducing the number of clicks. In a similar way to this script, they calculate the discounts in real time, automatically excluding sale items and selecting the lowest price.
4. Percentage Off Least Expensive Item
You don’t have to be a first-time customer to enjoy a discount. Advertising to people who have already shown interesting in your products (known in the industry as “remarketing”) can lead to a 70% increase in conversions.
When modified, the code can be just as useful to encourage second-time buyers. Consider Evy’s Tree again, whose Scripts and reward formula encourages 50% of their customers to make more than one purchase.
5. Tiered Pricing for Bulk Purchases
“Spend money to save money,” my friend once laughed. That’s exactly what this Script does. It provides every buyer an incentive to purchase multiples of the same product and increase average order size, creating the strange sensation of simultaneous spending and saving.
For example, depending on your margins, you might implement something like this:
- 5% off for 10-19
- 10% off for 20-29
- 20% off for 30+
Greats uses a similar script to display a very visible discount as customers increase the quantities to their cart, making it clear that the larger purchase offers incredible value.
On their B2B online store, Merchology does this by including real-time product pricing based on order quantity:
6. Tiered Discounts by Spending Thresholds
Similar to the previous script, this script allows buyers to unlock tiered discounts at different monetary levels. This encourages customers to add a new item to their cart to close the gap.
Brooklinen uses a version of this Script to combine a free gift alongside three discount “thresholds”:
- Spend $250 amount and get $50 off
- Spend $500 amount and get $100 off
- Spend $800 amount and get $200 off
7. Free Gift with Purchase
Speaking of gifts, a small, unexpected extra can be a wonderful, cost-effective, way to make a customer feel good as they check out. Emazing Lights adds a free, lightweight item that doesn’t impact shipping costs and can fit into flat rate containers for customers who reach a certain purchase threshold.
Similarly, for higher ticket items, Purple uses this approach by automatically adding The Purple Pillow to mattress purchases:
8. Free Standard Shipping for VIP Customers
Being part of a club can have its benefits, and while your company might not be Amazon Prime yet, you can certainly take a chapter from their book. Offer customers the opportunity to be a member of your community, and reward them with incentives like free shipping on items. You could also do an “item of the month” subscription service.
CandyClub offers specific subscription packages with different monthly lengths, products, and pricing. Similarly, Shopify Scripts enables Campus Protein to create a minimum price threshold, which unlocked free shipping for their customers.
9. Fallback Shipping Rate for Calculated Carriers
Shopify Plus comes built-in with custom calculated shipping rates for different carriers shown at the checkout. Depending on your Shopify plan, you’ll be eligible for reduced rates from USPS, UPS, DHL Express, and Canada Post.
Using these, you can calculate most shipping fees automatically, including offering free shipping based on cart value to optimize fulfillment costs at the customer’s benefit:
10. Offer Pickup for Customers By Shipping Location
Whether shipping is free or not, online customers might want to save time and just go into a physical store to pick up their product. This can save time and effort on the part of the distributor, but it has to be incentivized correctly — especially for omni-channel retailing that merges the worlds of online-to-offline commerce:
Warby Parker used the locations of its online consumers to gauge opportunities for opening physical stores. Over 75% of customers that buy at its stores browse online before coming in and enjoy the physical experience of the store.
11. Percentage Off Next Purchase If Accepted Marketing
Besides making actual sales, getting a customer’s email address is crucial for marketing and retargeting. There are a couple of ways that merchants do this, and one tried and true method is to offer a discount in exchange for the person’s email address.
SkinnyMe Tea offered a 5% discount and a free eating plan to anyone who gave their email address, and their email opt-ins increased by 758%. Additionally, the discount code improved their sales conversion rates by a full 1%.
12. Provide Invoice For Wholesale Order
The B2B ecommerce is trillions larger than B2C ecommerce, so it’s important not to neglect these less glamorous sales.
Laird Superfoods was wrestling with an extremely manual B2B ecommerce process. “It was a really labor-intensive and time-consuming process,” Laird’s CEO Paul Hodge says. “We had to add to payroll and hire more staff just to take orders.”
When they switched to Shopify Plus, they were able to dedicate their team’s time to research and marketing, instead of constantly answering the phone.
Sales now grow 15% per month, and 2017 Q2 year over year sales growth is at 550%. Their wholesale business is expected to expand to 75% of their company’s sales.
13. Auto-Select Default Payment Method
Abandoned carts exist all over the internet, and are left there by people who just couldn’t pull the trigger. Not to worry — you can customize your checkout to show your customers’ most relevant payment methods:
Urban Planet’s mobile checkout begins with offering shoppers a choice between PayPal, logging into their account, or utilizing Shopify Pay.
Pura Vida Bracelets, on the other hand, front loads their mobile checkout experience with PayPal and Amazon Pay as well as allowing customers to log into their accounts via email, Facebook, or Google and then pay by credit card:
14. Disallow Discount Codes for a Sitewide Sale
Some people work magic with discount codes … but, this can potentially get dangerous if they stack up and eat aggressively into your margins.
It’s crucial to protect your business amidst promotions and ensure that discount codes don’t run recklessly alongside sitewide sales. Think especially of Pura Vida Bracelets’ 50% off Black Friday, Cyber Monday extravaganza.
15. Calculate Value-Added Tax (VAT) Rates In Europe
The product finally reaches the buyer. And as the delivery man hands it over to them he also hands over a bill…
That’s exactly what happened to Nanoleaf. Their customers were understandably upset when they were slapped with taxes, tariffs, and courier fees after they already paid for their products.
Their Shopify Script allows the company to set up international storefronts that let customers check out in their own currencies, and offered local deliveries that were faster and cheaper than their previous international providers.
Hidden fees and taxes sour the experience. These unexpected costs ruin the buyer’s experience, making it less likely that they come back. That’s why it’s crucial to be able to show a customer exactly what they’ll be paying, in their own currency and taxes, in order to deliver some transparency and build trust.
Additional Ecommerce Checkout Resources
For more guidance, take a look at how to …
- Customize your checkout pages themselves
- Install Shopify Scripts and Scripts Editor
- Understand Ruby methods within Scripts
- Use, create, and customize with the Scripts Editor
- Get Started with Shopify Scripts: A Practical Walkthrough
- Explore my own Scripts builder, Playwright, which requires zero coding knowledge to put into action
Final Thoughts on Optimizing Your Ecommerce Checkout
I’ve shared over a dozen codes here, and I want to leave you with some thoughts on how to pick and choose which one to start with.
Your promotion must make sense for your customer base and your product.
How price-sensitive are your customers? What discount would they respond to — or do they care about saving money? If they’re loyal to your brand, do they care more about exclusive free gifts than price?
If you’re not sure, that’s okay — make an educated guess (i.e., a “hypothesis”), and consider this the first test as a way to validate that guess.
Don’t just do something because you saw another merchant, or a competitor, doing it. Take a step back and figure out what the reason is for their promotion.
Also, a promotion is only as good as it is communicated clearly. Running too many promotions at once can confuse customers as they decide on the best one to choose (or try to learn about all of them!). More choices lead to fewer decisions.
As a rule of thumb, especially at the beginning, I’d recommend only running a couple of different scripts at the same time. This means you can test different discounting strategies, but really focus on communicating them to your customers and seeing which work. It’s common to have one script running all the time, and then an extra promo to new customers or a sitewide discount.
Lastly, creating a coherent story makes your promotion far more shareable and interesting to shoppers. For example, one of the merchants we worked with offered a “12 days of Christmas” special during the holidays — sharing 12 completely different promos each day until Christmas. They promoted this with an email announcing and explaining the promotion every day.
On that note …
I hope you use Shopify Scripts to the fullest! It’s a great tool to drive conversions, attract new customers, and retain old ones.