> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://shopdoctors.crisp.help/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How do I track the usage of Affiliate Codes?

This is actually a limitation in our App since Shopify does not count discount usage when a custom discount stacking app is used - with a Draft Order or with the Single Auto-generated Discount option.

Some affiliate attribution apps will read the discounts in both draft orders and auto-generated discounts, and will parse them and figure out which affiliate code was used, but you'd need to use another app for this purpose, Shopify won't count the usage consistently.