Affiliate attribution via user ID
With affiliate attribution using an email hash, the affiliate is securely assigned to a buyer. We use the user's email address, or more precisely a hash value of the email address, as the user ID. If a buyer then enters an email address when making a purchase, we check whether an affiliate is stored for this email address (or more precisely for the hash value of the email address). If so, the purchase is assigned to this affiliate and the affiliate receives their sales commission.
What is a hash value?
The hash value is a number that is derived from the email address. In this way, the email address is masked and can no longer be determined from the hash value. Two different email addresses have two different hash values. Example: The hash value of the email address info@some-domain.com is:
b911b464baff15d44ecf9516f0b27e61e43b35042f9aa29c2a5dd10948ebb3c4/d95babb3221bac9606da481414a61f3d2fddd9f73920a91a3b77df304c5622aa
This value is unique for info@some-domain.com. If you only have the hash value but don’t know the email address, you cannot find out the email address. This ensures data protection. Technical note: The hash value is calculated as follows: $hash = sha256( $email );
Note
Affiliate attribution using an email hash is downstream. If an affiliate can be identified via the cookie, this will take precedence.
Please make sure that you have the user’s consent to transfer their email address to Digistore24. Obtain the buyer’s consent, e.g. with this text: “I consent to my email address being transferred to Digistore24.com for the purpose of order processing.” Please seek legal advice on whether/how you can use this text for your business.
Enter the user ID and the affiliate
You can assign the affiliate to the hash value of the email address in the following ways:
Promolink
You add the email address as the GET parameter “email” to the promolink: https://www.digistore24.com/redir/1234/affiliate/?email=klaus.meier@some-domain.com
Promocode
You use a promocode, e.g.:
<script src="https://www.digistore24-scripts.com/service/digistore.js"></script> <script> digistorePromocode( PRODUCT_ID );</script>
The affiliate, campaign key and email address are then read via the GET parameter (if specified).
Example
- You have the Digistore24 product 12345.
- Your affiliates direct visitors to your landing page (e.g. an opt-in page).
- During the funnel, visitors enter their email address. They are directed (e.g. after an autoresponder opt-in) to a thank you page where the email address is transferred as a GET parameter.
- The landing page and thank you page are on the same domain (e.g. www.some-domain.com).
Include this code on your landing page and on the thank you page:
<script src="https://www.digistore24-scripts.com/service/digistore.js"></script> <script> digistorePromocode( 12345 ); </script>
Your affiliates will then promote this URL:
https://www.some-domain-name.com/?aff=AFFILIATE&cam=CAMPAIGNKEY
Your affiliates then replace AFFILIATE with their own Digistore24 affiliate ID. The user is then assigned to the affiliate on the landing page (still without an email address). The affiliate is stored in the cookie for this purpose. After opting in, users are then directed to your thank you page: https://www.some-domain-name.com/danke/?email=user@some-email.com. Your autoresponder software should add the GET parameter to the thank you page URL. The hash value of the email address is then assigned to the affiliate on the thank you page. The affiliate can then be correctly assigned when a purchase is made.
Other GET parameter names
If the GET parameter is NOT “email”, use this code:
<script src="https://www.digistore24-scripts.com/service/digistore.js"></script> <script> digistoreSetEmailParamName( "someotherparamname" ); digistorePromocode( 12345 ); </script>
https://www.some-domain-name.com/danke/?someotherparamname=user@some-email.com
WordPress plugin
The promocode can also be integrated via our Digistore24 WordPress plugin. All you need to do is
activate the plugin and
enter the Digistore24 product ID in the WordPress admin area under Settings – Digistore24.
Advanced options
The following options require some programming work. They should only be of interest to you if you employ software developers and have your own platform.
Via API call
Use the Digistore24 API feature setAffiliateForEmail(). You can also transfer the hash value directly in place of the email address, i.e.: hash256( $email )
Via promocode
If the email address or the affiliate is already known in your application, both can be set using a promocode:
<script src="https://www.digistore24-scripts.com/service/digistore.js"></script> <script> digistoreSetEmail( "eine-email@addresse.com" ); digistoreSetAffiliate( "someaffiliate" ); digistorePromocode( 12345); </script>
You can choose to set either just the email address or just the affiliate using the JavaScript function. Missing values are then taken from the GET parameters of the URL.