Affiliate attribution via the email hash

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.

Example:

The hash value of the email address info@some-domain.com is:

b911b464baff15d44ecf9516f0b27e61e43b35042f9aa29c2a5dd10948ebb3c4/d95babb3221bac9606da481414a61f3d2fddd9f73920a91a3b77df304c5622aa

This value is unique to info@some-domain.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 );

Note

  • 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:

https://www.digistore24.com/redir/1234/affiliate/?email=klaus.meier@some-domain.com

Promo tracking code

You use a promo tracking code e.g.

<script src=”https://www.digistore24.com/service/digistore.js”></script>
<script>
digistorePromoPixel( PRODUCT_ID );</script>
</script>

D

The affiliate, campaign key and email address are then read by the GET parameter (if specified).

Example:

  • 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:

https://www.some-domain-name.com/?aff=AFFILIATE&cam=CAMPAIGNKEY

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:

https://www.some-domain-name.com/thankyou/?email=user@some-email.com

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>

https://www.some-domain-name.com/thankyou/?someotherparamname=user@some-email.com

WordPress plugin

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.

Advanced options

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

https://docs.digistore24.com/knowledge-base/setaffiliateforemail/

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( "eine-email@addresse.com" );
digistoreSetAffiliate( "someaffiliate" );
digistorePromoPixel( 12345);
</script>

You can choose to set only the email address or only the affiliate via the JavaScript function. Missing values are then taken from the GET parameters of the URL.

 

Updated on 23. February 2021

Was this article helpful?

Related Articles