Solved

Button URLs in Sign Up forms and Shopify Discount Codes

  • 7 March 2023
  • 2 replies
  • 224 views

Badge +1

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? 

icon

Best answer by Dov 8 March 2023, 15:43

View original

2 replies

Userlevel 7
Badge +61

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.

Badge +1

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

Reply