Skip to content
GRIN Classic Help Center home
InboxAsk a human

Applying Discount Codes to Affiliate Links in Shopify

Updated by Dan

You are able to create affiliate links that once clicked will automatically apply your creator's discount code at checkout. This allows you to not only track traffic to your site but also allow the customers to use a discount. Once a sale is made through the link and the code is applied, GRIN will track and record the sale only through the link.

In order to set up an affiliate link with a discount code that applies at checkout, you will first need to create a discount code group. Once created, follow the steps within this guide to set up your affiliate link.

Note: Currently, discount codes can only be embedded in affiliate links if your Brand is integrated with Shopify. If you are using a headless Shopify store, you may require additional setup than what's in this article. Contact our support team for more information.

Warning: Assign discount codes before affiliate links if you want links to apply codes automatically.

When assigning an affiliate link that has an attached discount code, you must first assign the creator the discount code and then the affiliate link. Assigning the affiliate link before the discount code will create a link with no codes as it does not yet exist.


1. Click on Brands within the navigation bar.

2. Click on the Affiliate Links icon.

3. Click New Link in the top right-hand corner.

4. Under Step 2: URL Details, set up a Destination URL, and add "/discount" to the URL.

5. Click Variables and drag and drop the discount code group variable for the code you would like applied when the links are used.

6. Click Save.


1. Click on Brands within the navigation bar.

2. Click on the Affiliate Links icon.

3. Click New Link in the top right-hand corner.

4. Under Step 2: URL Details, set up a Destination URL using the format: https://www.brand.com/discount/[discount code group variable]?redirect=%2Fpath%2Fproduct

5. Click Save.


If a creator's affiliate link is directing your brand page but not applying discount codes, then it is likely the code or affiliate link is not correctly applied to the creator.

Make sure you have walked through Creating a Discount Group, and then return to How to Create Affiliate Links with an Applied Discount Code above.