Affiliate attribution via user ID
With affiliate attribution via the email hash, the affiliate is securely assigned to a buyer.
We use the user’s email as the user ID i.e. the hash value of the email address.
If a buyer then enters an email address when making a purchase, we look to see if an affiliate is assigned for that email address i.e. the hash value of the email address.
If yes, the purchase is then assigned to this affiliate and they will receive their sales commission.
What is a hash value?
The hash value is a number that is calculated from the email address. The email address is thereby disguised and cannot be determined from the hash value. Two different email addresses have two different hash values.
The hash value of the email address firstname.lastname@example.org is:
This value is unique to email@example.com. If you only have the hash value, but do not know the email address, the email address cannot be determined. This way, data protection is guaranteed.
Technical note: The hash value is calculated as follows: $hash = sha256( $email );
- The affiliate attribution via the email hash is downstream. If an affiliate can be determined via the cookie, this has priority.
- Please make sure that you have the user’s consent to transfer their email address to Digistore24. Gain the consent of the buyer using a text like this: “I allow my email address to be transferred to Digistore24.com for the purpose of order processing.” Please consult a lawyer to find out whether/how you can use this text for your business.
Storing the user ID and the affiliate
You can assign the affiliate to the hash value of the email address in the following ways:
You append the email address as the GET parameter “email” to the promolink:
Promo tracking code
You use a promo tracking code e.g.
digistorePromoPixel( PRODUCT_ID );</script>
The affiliate, campaign key and email address are then read by the GET parameter (if specified).
- You have the Digistore product 12345.
- Your affiliates direct visitors to your landing page (e.g. an opt-in page)
- During the funnel, the visitors enter their email address. They will be redirected (e.g. after an autoresponder opt-in) to a thank you page where the email address is transferred as a GET parameter.
- Landing page and thank you page are on the same domain (e.g. www.some-domain.com)
On your landing page and on the thank you page you include this code:
<script src="https://www.digistore24.com/service/digistore.js"></script> <script> digistorePromoPixel( 12345 ); </script>
Your affiliates then promote this URL:
as well as this one:
https://www.some-domain-name.com/#aff=AFFILIATE&cam=CAMPAIGNKEY (with # instead of ?)
Your affiliates will then replace AFFILIATE with their own Digistore affiliate ID.
On the landing page, the user is then assigned to the affiliate (still without the email address). The affiliate is stored in the cookie for this purpose.
After the opt-in, the users are then directed to your thank you page:
Your autoresponder software must append the GET parameter to the thank you page URL.
On the thank you page, the hash value of the email address is then assigned to the affiliate.
This allows the affiliate to be correctly assigned when a purchase is made.
Other GET parameter name
If the GET parameter is NOT email, use this code:
<script src="https://www.digistore24.com/service/digistore.js"></script> <script> digistoreSetEmailParamName( "someotherparamname" ); digistorePromoPixel( 12345 ); </script>
The tracking code can also be integrated via our Digistore24 WordPress plugin. It is sufficient to:
- activate the plugin and
- enter the Digistore24 product ID in the WordPress admin area under Settings > Digistore24.
The following options require programming knowledge. They will only be of interest to you if you employ software developers and have your own platform.
Via API call
Use the Digistore24 API function setAffiliateForEmail().
You can also transfer the hash value directly instead of the email address i.e. hash256( $email )
Via a tracking code
If the email address or the affiliate is recognized in your application, both can be set using a tracking code:
Email address of the affiliate:
<script src="https://www.digistore24.com/service/digistore.js"></script> <script> digistoreSetEmail( "firstname.lastname@example.org" ); digistoreSetAffiliate( "someaffiliate" ); digistorePromoPixel( 12345); </script>