Add Urgency and Social Proof to Your Shopify Checkout Page to Reduce Cart Abandonment
Taeef Najib
Data Scientist @Sidetrek | MBA in Marketing | 3x Kaggle Expert | IBM Certified Data Scientist | AI Engineer | Experienced in LLMs, Computer Vision, ELT, Machine Learning and Data Analytics
One of a few mistakes I made on my first Shopify store was not adding any kind of urgency to the checkout page. This resulted in too many Cart Abandonment for the first few Facebook ad campaigns. My products had proven records of success! I had some great copy. I tried a countdown timer on the product page to add some urgency. I even tried adding some scarcity! But people were still leaving their carts without purchasing. That's when I came up with an idea of adding urgency to the checkout just to see if it improves the situation. Guess what? It did! I looked for an app that does it for me! As I always say humans are lazy! I am lazy! I didn't want to play with codes. I found this free app "Conversion Plus" pretty useful. But then I found another solution which not only adds scarcity but also adds some social proof by placing the trust badges on the checkout page of your Shopify store.
I'd give full credit to this awesome tool here for everything that is written here.
You can customize how you want the timer to be and which trust badges you'd like to place on the checkout page, and generate a custom JavaScript.
You can generate your own code or use the one I used:
function createCookie(a,b,c){if(c){var d=new Date;d.setTime(d.getTime()+c*60*1e3);var e="; expires="+d.toUTCString()}else var e="";document.cookie=a+"="+b+e+"; path=/"}
function readCookie(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;d<c.length;d++){for(var e=c[d];" "==e.charAt(0);)e=e.substring(1,e.length);if(0==e.indexOf(b))
return e.substring(b.length,e.length)}return null}function eraseCookie(a){createCookie(a,"",-1)}function crtmedir(a){var b=document.createDocumentFragment(),c=document.createElement("div");
for(c.innerHTML=a;c.firstChild;)b.appendChild(c.firstChild);return b}function startTimer(start, duration, display){var diff,minutes,seconds;function timer(){diff=duration-(((Date.now()-start)/1000)
|0);minutes=(diff / 60)|0;seconds = (diff % 60)|0;minutes = minutes < 10 ? "0" + minutes : minutes;seconds = seconds < 10 ? "0" + seconds : seconds;display.textContent = minutes + ":" + seconds;
if (diff <= 0){clearInterval(inti);document.getElementById("countdownhere").innerHTML = "Order reservation ended.";start = Date.now() + 1000;}};timer();
var inti = setInterval(timer, 1000);}var pdm = crtmedir
('<div class="countdownholder"><div id="countdownhere" style="display:block;background:#fff5d2;padding:10px 20px;border:1px solid #e3df74;font-size:14px;
?color:#2c2c2c;font-weight:bold;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px; margin:20px 0px">Due to the high demand for our products, we had to reserve your order for <span id="time">
?</span> minutes! Please, complete your purchase ASAP!</div><div style="display:table;width:100%"><div style="width:33.3%;display:table-cell;float:none;height:100%;vertical-align:middle;text-align:center">
?<img src="https://cdn.shopify.com/s/files/1/1319/2435/t/3/assets/accredited.png" style="margin:0 auto"></div><div style="width:33.3%;display:table-cell;float:none;height:100%;vertical-align:middle;text-align:center">
?<img src="https://cdn.shopify.com/s/files/1/1319/2435/t/3/assets/truste.png" style="margin:0 auto"></div><div style="width:33.3%;display:table-cell;float:none;height:100%;vertical-align:middle;text-align:center">
?<img src="https://cdn.shopify.com/s/files/1/1319/2435/t/3/assets/mcafeesecured.png" style="margin:0 auto"></div></div></div>');if(window.location.href.indexOf('checkout')
> -1 && document.location.href.indexOf('thank_you') === -1){window.onload = function () { document.getElementsByClassName('main__header')[0].appendChild(pdm);var dolzina=10;var ten=60*dolzina;var starttime=Date.now();
var xcnt=readCookie('prtcntdwn');if(xcnt){if(starttime<xcnt){ten=(xcnt-starttime)/1000;}else{eraseCookie('ptcntdwn');createCookie('prtcntdwn',Date.now()+(ten*1000),ten+1);}}
else{createCookie('prtcntdwn',Date.now()+(ten*1000),
ten+1);}display=document.querySelector('#time');startTimer(starttime, ten, display);};}
To place this code to the checkout page, login to the admin area of your store. Now click on "Online Store" from the sidebar. Click on "Preference" at the bottom of the list. You must have your Google Analytics account linked to your store, in order for the code to work! Once you place your Google Analytics code on this page, you'll find another section called "Additional Google Analytics Javascript" where you'll find a place to insert your code. Now copy and paste the code into the area.
Now test your store's checkout page and you should see something like this:
This piece of code had an amazing effect on the cart abandonment rate of my store. It dramatically improved the overall conversion rate. I hope this article will help you improve yours as well. Thanks.
Happy selling!
#Shopify #Dropshipping #Entrepreneurship #eCommerce
e-com Specialist & UX/UI Designer
6 年Great tip! Thank you Taeef :)
Performance Marketing Consultant for Unrivaled Market Expansion
7 年This code didn't work for me. Tried it on two different stores.
Thanks for excellent tips. But I wonder how to add first screen of check out, in my theme there is two buttons on the first page of the check out on the mobile.one button is update cart and other is check out. I want to add this below these buttons. Thanks Salih
Awkward Comedian, Social Stuntman, Youtuber
7 年Installed the code. Excellent tip, thanks a lot.