As a general rule, it is sufficient to include the Digistore promocode on your sales page so that Digistore24 can correctly attribute affiliates.
If you use your own JavaScript (e.g. if you create a buy button via JavaScript) for forwarding buyers to the order form, then you need this function:
digistoreAppendAffiliateToUrl(string url) : string
Transfer the checkout URL as a parameter. The function adds the affiliate as a GET parameter to the checkout URL so that it can be captured on the Digistore order form.
Example
<button onclick="window.open(digistoreAppendAffiliateToUrl( 'https://Order-form-URL/product/Product-ID' ));">Buy now</button>
Test
This is how you check if the affiliate is correctly assigned:
- Look at the order form. The current affiliate is displayed in the bottom right-hand corner:
- If the name of the affiliate you entered on the sales page is there, the assignment is working correctly.
- If it says
[ none ]
, the purchase will be made without an affiliate.