Monetise your mobile app activity with our SDK.
Tradedoubler's mobile Software Development Kit (SDK) extends your earning potential to apps. Whether you drive traffic from mobile web or in-app the SDK allows you to:
The mobile SDK supports the Android and iOS platforms. They include all the benefits of Tradedoubler's accurate and secure tracking with mobile specific additions.
Do not have a publisher account? Register with Tradedoubler and get started today!
This documentation is intended for publishers. If you are an advertiser, go to the advertiser documentation.
Our world-class tracking accuracy, robustness and security available for advertisers' desktop and mobile sites is mirrored in our mobile SDK. No matter where you drive traffic from - desktop site, mobile site or app - Tradedoubler's SDK will track the app download and subsequent in-app activity.
The SDK operates differently depending on the platform (iOS or Android) but the functionality remains the same.
App Download Tracking (ADT) allows you to drive app installs and earn commission on a CPI basis.
Once the download has taken place quality traffic will often result in post-download activity. This could include in-app purchases, reaching a certain game level or registering for a service. ADT allows you to earn commission on a CPA/CPL basis meaning you have a long-term revenue stream from mobile apps.
Now you can go even further in monitising your mobile activity and be rewarded for its lifetime value.
Native apps are tailor-made to the consumer's device platform and can give the best user experience and highest conversion rates. Tradedoubler's In-App Tracking (IAT) allows you to send users straight to a previously installed app and get rewarded for activity that takes place. That means increased mobile earnings!
You can now incorporate your apps within your performance marketing activities.
If a user can search for specific products, results, etc. within your app you may want to send them to that specific area of the advertiser's app. Tradedoubler's SDK supports a standard deep link format allowing you to define where the user ends up in the advertiser's app. This prevents the user having to search again, provides a better user experience and increases conversion rates.
In-app actions may take place when the device does not have an internet connection (e.g. underground transport or during a flight). When this happens Tradedoubler's SDK will store the action data locally. When the app is next launched the SDK will check for any stored actions and send them to Tradedoubler. This way you can be certain that all actions will be tracked.
This section explains how to implement Tradedoubler's tracking functionaltiy in your publisher app for the iOS and Android platforms.
The device ID is an indentifier unique to each device - iOS devices use the IDFA and Android devices use the Google Advertising ID. These IDs remain static unless the device is restored to factory settings and can therefore be used as an accurate tracking ID.
Device IDs are available for the publisher to collect at the time of click and the advertiser at time of download/conversion. This means there is no need to pass tracking data between the publisher and advertiser.
Your app must read the device ID and add it to the Tradedoubler click tag like this:
http://clk.tradedoubler.com/click?p(PROGRAM_ID)a(AFFILIATE_ID)g(AD_ID)deviceid(DEVICE_ID)On Android devices the Google Advertising ID can be collected with this code:
import com.google.android.gms.ads.identifier.AdvertisingIdClient; import com.google.android.gms.ads.identifier.AdvertisingIdClient.Info; : : Info adInfo = null; try { adInfo = AdvertisingIdClient.getAdvertisingIdInfo(mContext); } catch (IOException e) { ... } catch (GooglePlayServicesAvailabilityException e) { ... } catch (GooglePlayServicesNotAvailableException e) { ... } String AdId = adInfo.getId(); :On iOS devices the IDFA is accessed via the
advertisingIdentifier
property in the ASIdentifierManager
class. It can be collected with this code:
-[[ASIdentifierManager sharedManager] advertisingIdentifier];When the user clicks the link the device ID will be stored by Tradedoubler and used when matching the click with app download or in-app activity.
DeviceID
parameter is added to the Tradedoubler click tag and passed to Tradedoubler.DeviceID
parameter to the trackback and it is passed to Tradedoubler.Limit Ad Tracking is an iOS-specific function (iOS6 onwards) that enables users to highlight that they do not wish to receive targeted advertising. Apple states that if the user has turned Limit Ad Tracking on that you should "use the advertising identifier only for the following purposes: frequency capping, conversion events, estimating the number of unique users, security and fraud detection, and debugging".
You can check the Limit Ad Tracking setting by accessing the advertisingTrackingEnabled
property in the ASIdentifierManager
class.
The parameter is set to 'Yes' by default but you must check it's status and include it in the Tradedoubler click tag. If it is set to 'Yes' the click tag will look like this:
http://clk.tradedoubler.com/click?p(PROGRAM_ID)a(AFFILIATE_ID)g(AD_ID)deviceid(DEVICE_ID)limitAdTracking(off)If the parameter is set to 'No' then the click tag should look like this:
http://clk.tradedoubler.com/click?p(PROGRAM_ID)a(AFFILIATE_ID)g(AD_ID)deviceid(DEVICE_ID)limitAdTracking(on)
The limitAdTracking
parameter should always be included in the click tag for iOS devices. If limitAdTracking is set to 'on' conversion tracking will still work but no ad targeting can take place.
IAT allows you to direct a user straight to an advertiser's app if it is already installed. For web-to-app user journeys Tradedoubler will handle this process but when sending user's to another app from within your own app you need to control this process. The steps below show how this is done.
canOpenURL
method in the UIApplication
class.canOpenURL
method will return a value of 'YES'. Then you should:canOpenURL
method will return a value of 'NO'. Then you should:The following code is an example of how this could be achieved:
NSURL *appURL = [NSURL URLWithString:@"myapp://"]; if ([[UIApplication sharedApplication] canOpenURL:appURL]) { [[UIApplication sharedApplication] openURL:appURL]; } else { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://clk.tradedoubler.com/click?p(PROGRAM_ID)a(AFFILIATE_ID)g(AD_ID)deviceid(DEVICE_ID)limitAdTracking(off)"]]; }
The following code is an example of how this could be achieved:
public class Example extends Activity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); //Put the package name here boolean installed = appInstalledOrNot("com.Ch.Example.pack"); if(installed) { Intent LaunchIntent = getPackageManager() .getLaunchIntentForPackage("com.Ch.Example.pack"); startActivity(LaunchIntent); } else { Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://clk.tradedoubler.com/click?p(PROGRAM_ID)a(AFFILIATE_ID)g(AD_ID)deviceid(DEVICE_ID)limitAdTracking(off)")); startActivity(browserIntent); } } private boolean appInstalledOrNot(String uri) { PackageManager pm = getPackageManager(); boolean app_installed = false; try { pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES); app_installed = true; } catch (PackageManager.NameNotFoundException e) { app_installed = false; } return app_installed ; } }
You should follow the instructions in the Redirect to app section and add the location within the url
parameter like this:
http://clk.tradedoubler.com/click?p(PROGRAM_ID)a(AFFILIATE_ID)g(AD_ID)deviceid(DEVICE_ID)url(DEEPLINK_URL)
Tradedoubler will collect the contents of the url
parameter and add it to the deeplink
parameter on the forwarding URL.