Multi-device affiliate attribution
Normal affiliate attribution has a drawback because you cannot guarantee that the referred buyer will end up purchasing the product with the same device they used to open the affiliate's promolink.
As a result, the cookie set in the customer's browser when the promolink was accessed cannot be read if a customer purchases the product on another device - this means that the affiliate is not recognized and thus not remunerated.
This problem can be solved in three ways provided the customer entered data into an opt-in page before changing the device:
- With the Klick-Tipp feature "Digistore24 multi-device tracking".
- With the transmission of the affiliate ID via the autoresponder - this is done by automatically filling out an additional field when subscribing to a newsletter.
- Via a tracking code that automatically stores the affiliate ID in your system.
To implement the third point on this list, please follow the guide below.
Example of multi-device affiliate attribution
Eric enters data into an autoresponder on his smartphone. This means that he clicks on Anton's Digistore24 promolink on his smartphone and then lands on an opt-in form. The cookie is then set on his smartphone.
Eric then receives an email. However, he reads it on his PC and clicks on the link to the sales page contained in the email. He then gets to the order form using another link on the sales page. Nevertheless, Digistore24 should know that Anton was the one to refer the product to Eric. This is where multi-device affiliate tracking comes into play.
Guide
These steps are necessary to ensure the affiliate is still recognized for the purchase, even if the buyer switches from their smartphone to their PC.
- Get the Digistore API key
- Embed tracking code into opt-in page
- Enter and save affiliate
- Attach affiliate to order form URL
1. Get the Digistore API key
A description of how to get your users' Digistore API keys in your application is given here.
2. Embed tracking code into opt-in page
Call up your user's tracking code using the API function renderJsTrackingCode().
To do this, run the following PHP code on your server:
<?php
define( 'YOUR_API_KEY', '123-xxxxxxxx' );
require_once 'ds24_api.php';
try {
$api = DigistoreApi::connect( YOUR_API_KEY );
$data = $api->renderJsTrackingCode();
$api->disconnect();
$script_code = $data->script_code;
// Embed this tracking code into the platform user's
// landing page or your software.
} catch (DigistoreApiException $e) {
the( $e->getMessage() );
}
The tracking code may look like this:
<script src="https://www.digistore24.com/track_info/123/abcdef.js?input=NAME"></script>
Embed this JavaScript code into the page where prospective buyers first visit your platform, e.g. the homepage. Add your own JavaScript code, as described in the next section.
3. Enter and save affiliate
Create a JavaScript code that is also embedded onto the same page. The JavaScript code records the affiliate and stores them together with the buyer data in your database.
For example:
<script>
function myStoreAffiliate( affiliate, campaignkey, tracking_param )
{
// store the affiliate here together with the
// data of the prospective buyer.
}
window.addEventListener('digistore24_affiliate', function (event) {
var affiliate = event.detail.affiliate;
var campaignkey = event.detail.campaignkey;
var tracking_param = event.detail.tracking_param;
myStoreAffiliate( affiliate, campaignkey, tracking_param
);
}, false);
</script>
4. Attach affiliate to order form URL
If you direct the prospective buyer to the Digistore order form, you need to attach the affiliate data to the order form URL:
https://www.digistore24.com/product/12345/?aff=AFFILIATE&cam=CAMPAIGNKEY&ds24tr=TRACKING_PARAM
Top tip
If your user selects the product for the buy button on your platform, you can offer them their own Digistore products to choose from e.g. from a dropdown list. You can get the products via listProducts().