Support Center

Download Tracking API

Last Updated: Oct 22, 2013 11:27AM PDT
​Overview
 

The SkyRocket download tracking API is a simple RESTful HTTP interface that is used to track conversions from mobile ads shown in apps. Please make sure this call is made only once per lifetime of app (if integrated in your app) or once as server side call (if integrated as a S2S call).

 

Sample of request (HTTPS GET)
https://secure.appads.com/v2/ConfirmDownload?bundleId=BurstlyTestApp.2.0.0.38341&mac=f74adcbe093997dce6209162dc388ac22b5da3d5&advId=D6B5C5EB-2FFF-4FDB-8FB0-D545EFF9AD3D&aidhash=xxxxxxx&host=sdk&distribution=true


​Request parameters

Parameter
Required
Description
bundleId X bundleId of the application confirming download for
mac

 
X1,2

SHA1 hash of the capitalized MAC Address in UTF8 encoding
capitalized MAC Address: "
18:E7:F4:C6:20:0D"
​hashed: "
911a5da4556499891d80ce1b794f88106e437506​"
advId X1,3

Apple Advertiser Id (raw)

aidhash

 
X2

 
SHA1 hash of the lowercased AndroidId (raw) in UTF8 encoding
​raw: "9193375be9a1fb85"
hashed: "d444988665cb485b64550a16261c34fdec007200"
host

 
 

For SDK calls, SDK version (Example: host=sdk%201.40.0.32768)

For API integrations - Enter any value which will allow you to identify the campaign making the API call (Example: PokerAppCampaign123)

distribution




 
 

Indicates a distribution. If not passed assumes true (default).

  • true (Production build, conversion is being accounted for calculation of revenue)
  • false (Dev, Test build, conversion is not being accounted for calculation of revenue)

1 - at least one of these device identifiers is required for iOS 6 and lower.

2 - at least one of these device identifiers is required for Android.

3 - Required for iOS 6 and higher.

 

Response Codes:

HTTP Code
Description
200 Success - Request has been processed successfully and sent into the queue
403 Error - Missing/invalid parameters, this request should not be retried until missing/invalid configured parameters have been fixed
All Other

Temporary failure, attempt request again with a finite number of retries and delay. This will include requests timed out or have lost communication in the middle of execution.

Getting the Mac address from IOS:

 

		#include  // Per msqr
#include 
#include 
#include 

- (NSString *) macaddress

{
    int mib[6];

    size_t len;
    char *buf;
    unsigned char *ptr;

    struct if_msghdr *ifm;
    struct sockaddr_dl *sdl;
    

    mib[0] = CTL_NET;

    mib[1] = AF_ROUTE;

    mib[2] = 0;

    mib[3] = AF_LINK;

    mib[4] = NET_RT_IFLIST;

    
    if ((mib[5] = if_nametoindex("en0")) == 0) {

        printf("Error: if_nametoindex error\n");

        return NULL;
    }
    
    if (sysctl(mib, 6, NULL, &len, NULL, 0) < 0) {

        printf("Error: sysctl, take 1\n");

        return NULL;
    }
    
    if ((buf = malloc(len)) == NULL) {

        printf("Could not allocate memory. error!\n");

        return NULL;
    }
    
    if (sysctl(mib, 6, buf, &len, NULL, 0) < 0) {

        printf("Error: sysctl, take 2");
        return NULL;
    }
    
    ifm = (struct if_msghdr *)buf;

    sdl = (struct sockaddr_dl *)(ifm + 1);

    ptr = (unsigned char *)LLADDR(sdl);

    NSString *outstring = [NSString stringWithFormat:@"%02X:%02X:%02X:%02X:%02X:%02X",

                           *ptr, *(ptr+1), *(ptr+2), *(ptr+3), *(ptr+4), *(ptr+5)];

    // NSString *outstring = [NSString stringWithFormat:@"%02X%02X%02X%02X%02X%02X",
    // *ptr, *(ptr+1), *(ptr+2), *(ptr+3), *(ptr+4), *(ptr+5)];
    free(buf);


    return outstring;

}

 

Getting the AdvId / IDFA from iOS:

ASIdentifierManager is the official way to gather the Advertising Identification Number from a device running iOS6+.

Simply use the following: -[[ASIdentifierManager sharedManager] advertidingIdentifier]; 

 

Getting the Android ID from Android:

The following method can be used to get the appropriate Android ID from Android devices:

Settings.Secure#Android_ID returns the Android ID as a unique 64-bit hex string.

import android.provider.Settings.Secure;

private String android_id = Secure.getString(getContext().getContentResolver(),
                                                        Secure.ANDROID_ID); 

Getting the MAC Address from Android:

The following method can be used to get the appropriate MAC address from Android devices via the WifiManager:

WifiManager manager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
WifiInfo info = manager.getConnectionInfo();
String address = info.getMacAddress());

Contact Us

  • Email Us
support@burstly.com
http://assets02.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete