My name is Lizzy. I'm one of the Gurus on the support team at Shopify.
There are a few different ways you can accomplish tracking discount codes. The first way would be within the Shopify admin. If you're on the Shopify plan or higher you will have access to sales reports. One of these reports is "Sales By Discount." You can set up the columns to show you information about the order as well as the discount code used. You can see that here.
If you're not on the Shopify plan and upgrading isn't something you're currently interested in, there are apps that could help out. Some apps are for reporting and tracking sales by discount code, like these:
There are other apps that act as a database for finding affiliates and influencers. They handle the payments to the affiliates based on the sales referred to your store. I've linked some examples below.
The final suggestion I have is using an app like Affiliatly. It doesn't automatically pay your affiliates, but gives you the option to do so within the app and also tracks sales from coupon codes. It has the ability to use other tracking methods too. This means as you build and develop your marketing strategies you won't need to change the app you're using.
Have you been able to check out the different features of the Shopify plan, like gift cards and reduced credit card fees? They're all listed on our pricing page. I would be happy to answer any questions you have if you think the switch could be a good option for your business.