Auto Apply Coupons
M
Michael Walker
Could we please "auto apply" discount codes based on a URL parameter please?
It'd be great to automatically apply a 100% off coupon so that when someone loads the page, they can see the discount applied, but they don't need to manually input the code.
This would be simple – you could use the same logic you use for the "query key" Custom Field forms, and the URL could look something like:
Thank you.
Log In
S
Samy Shiplack
does this work on 2 step?
G
Guada Molina
This seems like a basic one!
S
Shelly Turner
Guada Molina To add the coupon into the field, add this at the end of your URL:
?coupon_code=YOURCODE
I have used this code to make it auto apply (so they do not have to click apply) and it seems to work. It delays the complete loading of checkout and then hits the apply. It waits 10 seconds to apply the code:
<script>
setTimeout(function(){
// Get the first element with class 'apply-coupon-btn' and click it
document.getElementsByClassName("apply-coupon-btn")[0].click();
}, 10000); // Wait 10 seconds before executing
</script>
J
Jacques Hopkins
Shelly Turner Is this still working for you?
I put the code exactly on the footer tracking of the page itself and it's not auto applying the coupon. I'm using the whole ?coupon_code=YOURCODE in the URL and the coupon code is in the field... it's just not getting auto applied.
T
Tony Barrett
This one seems pretty fundamental to me. Surely.
L
Lauren Scalf
Circling back to say this is still making me made this isn't a thing
L
Lauren Scalf
Why is this still not a thing 😭
T
Thomas Eder
Put this code in the footer of the funnel, it's some javascript that clicks the "apply coupon" button after the page has loaded.
<script>
setTimeout(function(){
// Get the first element with class 'apply-coupon-btn' and click it
document.getElementsByClassName("apply-coupon-btn")[0].click();
}, 3000); // Wait 3 seconds before executing
</script>
K
Kevin Libawski
Thomas Eder Legend ! Your script worked, the others here didnt! Thats the way to go guys! Does not work with 2step checkout though so I might have to seperate my checkout as a 2nd landingpage
J
Jacques Hopkins
Thomas Eder Is this still working for you?
I put the code exactly on the footer tracking of the page itself and it's not auto applying the coupon. I'm using the whole ?coupon_code=YOURCODE in the URL and the coupon code is in the field... it's just not getting auto applied.
J
John Elder
Any updates on this? Super useful...
D
Don Wilson
Any updates here? To convert our Shopify businesses over this is a basic need.
D
Don Wilson
Any update here? I've found workarounds that charge an extra $300 to setup, but this isn't ideal when apps like Clickfunnels and Shopify have this as a native functionality.
A
Anthony Llanos
Any updates?
S
Steve Day
definate bump to this - super useful for auto adding coupons to button links in campaigns so the client can see the real discount.
L
Lucas Garvin
Bump
Load More
→