> For the complete documentation index, see [llms.txt](https://docs.recomsale.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.recomsale.com/features/settings/tracking-by-discount-code.md).

# Tracking by discount code

When a customer places and pays an order via affiliate's discount code, RecomSale will record the affiliate's affiliate order and commission.

**Auto-generated discount code**

Automatically generate a discount code when the affiliate's application is approved by you.

<figure><img src="https://2575716831-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr4v7Zdrm3UIe4z57wtn4%2Fuploads%2FuXjXjcYvXqge9QN4fP4S%2F1.png?alt=media&amp;token=60a4b8bf-8976-4a67-a14b-eb312a88aa49" alt=""><figcaption></figcaption></figure>

If you enable this feature, the auto-approval page in the affiliate sign-up page will display an auto-generated discount code for the affiliates. Like this:

<figure><img src="https://2575716831-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr4v7Zdrm3UIe4z57wtn4%2Fuploads%2F7YvHp3mO0QAZANY7jjd2%2F2.png?alt=media&amp;token=b5f86052-0ff7-4a2d-9333-f6ef3a3a0912" alt=""><figcaption></figcaption></figure>

If you do not enable this feature, the discount code field does not display. Like this:

<figure><img src="https://2575716831-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fr4v7Zdrm3UIe4z57wtn4%2Fuploads%2FVTSNXbfepqbST3Tyb9Tn%2F3.png?alt=media&amp;token=b9b28d6b-bbf3-48a1-9c72-83aee25b0d73" alt=""><figcaption></figcaption></figure>
