The following examples illustrate typical attribution responses provided by the SDK via the attribution callback or property. While some values may differ slightly depending on the platform, the examples below will help you to determine how best to utilize the attribution response within your app.
Prior to Retrieval
Attribution retrieval requires the SDK to communicate with Kochava servers during the first launch of the app. This request typically happens 5-10 seconds after launch and will trigger the attribution callback upon completion. If your code queries the attribution property before attribution has been retrieved the returned value will be empty. In this case your code should wait for the attribution callback or try again later. Empty values are as follows:
iOS | Android and Other SDKs | ||||
---|---|---|---|---|---|
|
|
Non-Attributed Install Response
If the install was not attributed (organic), the following is returned:
iOS | Android and Other SDKs | ||||
---|---|---|---|---|---|
|
|
Attributed Install Example Response
If the install was attributed, the “attribution” value contains a larger object which describes the details of the attribution. The example below represents a typical attributed response.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
{ "attribution": { "agency_network_id": "0", "attribution_action": "install", "attribution_module": "kochava", "attribution_prompt": "click", "campaign": "Primary Campaign", "campaign_id": "YOUR-CAMPAIGN-ID", "click": { "date": "2017-11-22 21:31:40", "deeplink": "", "id": 629, "meta": { "adid": "THE-DEVICE-ADID", "control_server": "172.18.95.189", "original_request": "campaign_id=YOUR-CAMPAIGN-ID&network_id=0000&device_id=THE-DEVICE-ID&device_id_type=adid&site_id=none-providedko_click_id=ko_4ac75a15ecbc50faf&in_time_ms=1511386300332&in_time=1511386300&inboarder=f4&header_ip=000.111.222.333", "origination_ip": "000.111.222.333" }, "timestamp": 1511386300 }, "control_server": "172.18.95.189", "country": "US", "creative": "", "creative_id": "", "date": "2017-11-22 21:31:55", "date_modified": "", "date_processed": "2017-11-22 21:31:40", "date_utc": "2017-11-22 21:31:40", "day_of_week": "3", "device_id": "", "device_id_type": "adid", "device_ver": "Pixel XL-Android-8.1.0", "duplicate": "628", "geolocation": "", "header_ip": "000.111.222.333", "id": "629", "id_type": "adid", "id_value": "THE-DEVICE-ADID", "identifiers": "{\"adid\":\"THE-DEVICE-ADID\"}", "in_time": "1511386300", "in_time_ms": "1511386300332", "inboarder": "f4", "install": { "date": "2017-11-22 21:31:55", "id": 1064, "meta": { "advertiser_tracking_enabled": "0", "alt_device_id": "ALTERNATIVE-DEVICE-IDENTIFIERS", "app_version": "My App Version 1", "application_tracking_enabled": "0", "control_server": "172.18.95.123", "device": "Pixel XL-Android-8.1.0", "device_id": "THE-DEVICE-ADID", "device_id_type": "adid", "device_model": "Pixel XL-google", "device_ua": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Pixel XL Build/OPP5.170921.005)", "device_ver": "Pixel XL-Android-8.1.0", "in_time": "1511386315", "inboarder": "b5", "matched_by": "adid", "matched_on": "THE-DEVICE-ADID", "origination_ip": "000.111.222.333", "price_type": "cpc", "receipt_status": "no_receipt", "reconciliation_request_click": "201711222131566LQIEX6SGK856364925", "sdk_version": "AndroidTracker 3.3.0", "utm_source": "" }, "timestamp": 1511386315 }, "ip_address": "000.111.222.333", "ko_click_id": "ko_4ac75a15ecbc50faf", "legacy_tracker_id": "13033563741", "lookback": 2592000, "lookback_used": "default", "matched_impression": "", "matched_install": "", "month": "11", "network": "Kochava Soltest - General", "network_id": "2820", "network_key": "kochavasoltest", "original_request": "campaign_id=YOUR-CAMPAIGN-ID&network_id=2820&device_id=THE-DEVICE-ADID&device_id_type=adid&site_id=none-provided&ko_click_id=ko_4ac75a15ecbc50faf&in_time_ms=1511386300332&in_time=1511386300&inboarder=f4&header_ip=000.111.222.333", "price": "", "site": "none-provided", "site_id": "none-provided", "status": "publish", "tier": "Default Segment", "timestamp": 1511386315, "tracker": "adid", "tracker_id": "YOUR-TRACKER-ID", "unix_date": "1511386300", "user_agent": "", "waterfall_level": "device" }} |
NOTE: The attribution response is provided as a JSON dictionary; however, iOS provides this attribution response as a dictionary while all other platforms provide this value as a serialized dictionary in string form.