Personalized checkout and custom promotions with Shopify Scripts
Hi guys. Posting for the first time, so let me know if something is amiss.
I've been working on a puzzling task for a client of mine, and can't seem to figure out a good way to do it.
My clients would like to provide a 50% off on all products to first time purchasers on their site(no matter if they're signed up customer or not).
So far, the best way I've been able to think of, is to create a cookie for all users who visit the site, and based on whether they purchased anything, modify said cookie.
I would be modifying the frontend to accommodate for this, and adding a specific line item property to each item added to cart if the cookie confirms the fact that they're a first time purchaser. This way, I can check for that property in a checkout script, and if it's present, apply a 50% OFF discount on checkout.
Obviously, this plan has a lot of caveats. The main one being a clever user could reset their browser and keep taking advantage of this offer by deleting the cookie.
Another one being, how do I make sure the user has purchased a product ? There doesn't seem to be any option to run some JavaScript when a transaction is processed.
I would appreciate input from you guys on what the best way to go about doing this would be, and any issues you see in this plan. Thanks.
Well if I am not entirely mistaken you should be able to do that out of the shopify box.
1. Make a segment of customers who never bought anything so far
https://help.shopify.com/en/manual/customers/customer-segmentation
2. Make a discount available only to this segment.
3. charge your customer for great consulting effort 🙂
Hey MOISCHKOWITZ
Hi @darkAmdHa ,
You can add specific tag to every customer made successful purchase. On frontend check customer list via using their e-mail or phone number entered by user at time of checkout.
If user don't have specific tag in customer data apply discount coupon for them.
Hope this will resolve you query.
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024