How to insert discount code into Shopify product URL?

Daniel Martin<span class="id_verified_mark"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<path d="M256,512c-26.372,0-45.24-19.832-60.355-35.698c-6.432-7.815-14.119-14.515-22.727-19.832
	c-10.506-2.616-21.376-3.452-32.161-2.466c-22.727,0-48.348,0.858-66.358-17.045s-16.938-43.524-16.509-66.251
	c1.008-10.785,0.172-21.655-2.466-32.161c-5.317-8.608-12.017-16.295-19.832-22.727C20.154,301.24,0,282.372,0,256
	s20.154-45.24,35.591-60.355c7.815-6.432,14.515-14.119,19.833-22.727c2.637-10.506,3.473-21.376,2.466-32.161
	c0-22.62-0.858-48.348,17.045-66.251s43.631-17.474,66.358-17.045c10.785,1.008,21.655,0.182,32.161-2.466
	c8.608-5.317,16.284-12.017,22.727-19.832C210.76,20.154,229.628,0,256,0c26.372,0,45.24,20.154,60.355,35.698
	c6.432,7.815,14.119,14.515,22.727,19.832c10.506,2.637,21.376,3.473,32.161,2.466c22.727,0,48.348-0.858,66.358,17.045
	s17.474,43.631,17.045,66.251c-1.008,10.785-0.172,21.655,2.466,32.161c5.317,8.608,12.017,16.295,19.832,22.727
	C491.846,210.76,512,229.628,512,256s-20.154,45.24-35.591,60.355c-7.815,6.432-14.515,14.119-19.832,22.727
	c-2.637,10.506-3.473,21.376-2.466,32.161c0,22.62,0.858,48.348-17.045,66.251c-17.903,17.903-43.631,17.474-66.358,17.045
	c-10.785-1.018-21.655-0.182-32.161,2.466c-8.608,5.317-16.284,12.017-22.727,19.832C301.24,491.846,282.372,512,256,512z
	 M151.156,409.621c13.164-0.6,26.318,1.404,38.7,5.896c14.526,7.333,27.369,17.592,37.735,30.124
	c9.327,9.755,21.441,21.977,28.302,21.977c6.861,0,18.975-12.221,28.301-21.977c10.367-12.532,23.209-22.791,37.735-30.124
	c15.898-5.296,32.729-7.258,49.42-5.789c12.436,0,29.588,0,34.198-4.074c4.61-4.074,4.288-21.441,4.074-34.198
	c-1.469-16.691,0.493-33.522,5.789-49.42c7.333-14.526,17.592-27.369,30.124-37.735c9.755-9.327,21.977-21.441,21.977-28.302
	s-12.221-18.975-21.977-28.301c-12.532-10.366-22.791-23.209-30.124-37.735c-5.296-15.898-7.268-32.729-5.789-49.42
	c0-12.436,0-29.588-4.074-34.198c-4.074-4.61-21.441-4.395-34.198-4.074c-16.691,1.469-33.512-0.504-49.42-5.789
	c-14.526-7.333-27.369-17.592-37.735-30.124c-9.327-9.755-21.441-21.977-28.301-21.977c-6.861,0-18.975,12.221-28.302,21.977
	c-10.367,12.532-23.209,22.791-37.735,30.124c-15.909,5.285-32.729,7.258-49.42,5.789c-12.436,0-29.588,0-34.198,4.074
	s-4.288,21.441-4.074,34.198c1.469,16.691-0.493,33.522-5.789,49.42c-7.333,14.526-17.592,27.369-30.124,37.735
	c-9.755,9.327-21.977,21.441-21.977,28.302c0,6.861,12.221,18.975,21.977,28.301c12.532,10.366,22.791,23.209,30.124,37.735
	c5.296,15.898,7.268,32.729,5.789,49.42c0,12.436,0,29.588,4.074,34.198c4.074,4.61,21.441,4.288,34.198,4.074L151.156,409.621z"/>
<path d="M234.559,331.685c-5.028,0.011-9.906-1.694-13.829-4.824l-53.601-42.881
	c-9.53-7.633-11.063-21.558-3.43-31.089s21.558-11.063,31.089-3.43l38.164,30.553l82.439-82.439c8.641-8.641,22.663-8.641,31.303,0
	s8.641,22.663,0,31.303l-96.482,96.482C246.041,329.455,240.413,331.728,234.559,331.685z"/>
</svg></span>
Daniel Martin Apr 2, 06:13

Do you know you can insert a discount code to your product URL so the discount applies automatically? Insert a discount code to your product URL is an easy job.

Step 1: Create your discount code on your Shopify admin panel

  1. Click Discount on the left side menu
  2. Click Create Discount at the top right corner
  3. Follow the instruction to create the discount code

Step 2: Form the discounted product URL

What does work is to use the discount permalink, with a redirect. For example:

https://your-shop-domain/discount/your-discount-code?redirect=/products/the-product-handle

The product handle is the last part of your frontend product URL, check the following graphic.

Shopify product URL with discount code.

Edited by Daniel Martin Apr 3, 03:41
Sign in to join the discussion.