Skip to main content
Solved

Button URLs in Sign Up forms and Shopify Discount Codes


Forum|alt.badge.img+2

I have a fly-out sign up form on my web site that includes email signup, SMS signup, and a unique Shopify discount code. On the signup success step is also a button that brings the user to a page to start shopping. 

Shopify allows me to use a URL to set the discount code automatically (one less copy and paste for the end user). The URL to automatically use a discount code should look like this: 

https://mywebsite.com/discount/UNIQUEDISCOUNTCODE?redirect=/collections/starthere

On the success step for the signup form form, I have the unique discount code (shows up no problem). And I’d love to have the following in the URL for the button on that same step: 

 

https://mywebsite.com/discount/{% coupon_code 'Signup_and_save_10' %}?redirect=/collections/start

 

However, when I put this in and tested it, I got exactly that (code included) as the URL for the button - not the unique coupon code for that customer - although the unique code was correctly shown in the text box on the same step.

Any way to get this dynamic discount code as a link in the signup form? 

Best answer by Dov

Hi @fgroast,

Thanks for sharing this question with us.

I’m afraid there isn’t a default way to automatically apply a discount code from a Klaviyo sign-up form upon a button click. If you follow our guide on adding a unique coupon code to your Klaviyo sign-up form, the code will automatically apply to a customer's Shopify checkout page when they copy the code from the form's success message (no need to paste). You can learn how to add a link that automatically applies a unique coupon code to a customer's cart on the checkout page for abandoned cart emails here.

I hope that’s helpful and thanks for being a community member.

View original
Did this topic or the replies in the thread help you find an answer to your question?

2 replies

Dov
Forum|alt.badge.img+61
  • Klaviyo Alum
  • 1493 replies
  • Answer
  • March 8, 2023

Hi @fgroast,

Thanks for sharing this question with us.

I’m afraid there isn’t a default way to automatically apply a discount code from a Klaviyo sign-up form upon a button click. If you follow our guide on adding a unique coupon code to your Klaviyo sign-up form, the code will automatically apply to a customer's Shopify checkout page when they copy the code from the form's success message (no need to paste). You can learn how to add a link that automatically applies a unique coupon code to a customer's cart on the checkout page for abandoned cart emails here.

I hope that’s helpful and thanks for being a community member.


Forum|alt.badge.img+2
  • Author
  • Problem Solver I
  • 3 replies
  • March 8, 2023

Thanks, Dov. I see how that works now. I didn’t realize it applied the code already, so no need for the URL on the signup form. 

Eric