If you would like to provide your affiliates with a coupon/referral code that they can give out to people instead of giving them their affiliate link, this feature is what you would use. When this feature is implemented, when a customer uses an affiliate's coupon/referral code, they will get a discount for their purchase and the affiliate will get credited their commission for referring the sale.
To Get started, log in to your admin control panel and then go to Referral Programs.
Step 2. Click Promotional Settings and the button that says "Promo Code Tracking"
Step 3. Click the "Add Promo Code Tracking" button:
Step 4. Type in the name of the coupon that you created in your Shopify shopping cart, select the corresponding user and then select the referral program and submit.
NOTE: To create a coupon code in Shopify, simply log-in to your admin control panel and click on "Discounts" on your left navigation, and then click the "Add discount code" button.