{"__v":8,"_id":"564f456ab85ee335004cbdb3","category":{"__v":5,"_id":"56858767d96a760d00545da6","pages":["568587afa3c7070d003dd7a8","5685979c3703ed1700e420bf","56859893d96a760d00545db9","5693c1d03e9d080d00f0641f","5693cb3a237d3b0d00740650"],"project":"564621e00c30fb2100ba3814","version":"564621e10c30fb2100ba3817","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-31T19:52:07.609Z","from_sync":false,"order":5,"slug":"mobfox-demand-side-platform","title":"Advertiser Resources"},"parentDoc":null,"project":"564621e00c30fb2100ba3814","user":"56499dade2efd717002afc83","version":{"__v":14,"_id":"564621e10c30fb2100ba3817","project":"564621e00c30fb2100ba3814","createdAt":"2015-11-13T17:46:09.275Z","releaseDate":"2015-11-13T17:46:09.275Z","categories":["564621e10c30fb2100ba3818","564624cf0c30fb2100ba3822","564628d69f3f550d00fa3db6","564dafeeda00e82b00ed601d","564daff8fc36dc3700882b95","564db0ccda00e82b00ed601f","564dcf87d3320b0d0028ca10","5661a6e436398e0d00f79566","568585153703ed1700e420b0","56858767d96a760d00545da6","56858d693703ed1700e420b2","56858d8d22c41b0d00e4666c","56859e9c009a8d0d00797130","5685a6453703ed1700e420d3"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-20T16:08:10.426Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"The MobFox conversion tracking API allows you to track both app installs as well as and other types conversion events that result from running your mobile advertising campaigns on MobFox. Once you are setup to post-back conversion data to our API, you will be able to see the total number of conversions, cost per conversion, and other useful information directly in the MobFox campaign management dashboard.\n\nOnce conversions are being logged, you will also be able to optimize your mobile advertising campaigns towards your target CPA/CPI by excluding poor-performing Publishers and Devices from your campaign.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"API URL and GET/POST Parameters\"\n}\n[/block]\nYou can call the MobFox Conversion tracking API URL using either GET or POST as the request method. Depending on the type of conversion you are posting to the API, there are a number of obligatory and optional parameters that need to be included when calling the API.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"API Base URL\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"http://my.mobfox.com/conversion.track.php?{requestParameters}\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"API Parameters - Tracking by Click ID (Token)\"\n}\n[/block]\nIf you are using the MobFox Click Token \"MFOXCLICKID\" (learn more about click tokens here) in your ad unit click URL's you can post the collected value from this token back to our Conversion Tracking API once a conversion has been generated. The below parameters are required in order to track conversions by Click ID.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Required\",\n    \"h-2\": \"Platform\",\n    \"h-3\": \"Example Input\",\n    \"h-4\": \"Description\",\n    \"0-0\": \"account_id\",\n    \"1-0\": \"tracking_type\",\n    \"2-0\": \"click_id\",\n    \"3-0\": \"conversion_description\",\n    \"0-1\": \"Yes\",\n    \"1-1\": \"Yes\",\n    \"2-1\": \"Yes\",\n    \"3-1\": \"Yes\",\n    \"0-2\": \"All Platforms\",\n    \"1-2\": \"All Platforms\",\n    \"2-2\": \"All Platforms\",\n    \"3-2\": \"All Platforms\",\n    \"0-3\": \"154\",\n    \"1-3\": \"click_id\",\n    \"2-3\": \"3b3eda5569bbfb7f93d465529f5a3db0\",\n    \"3-3\": \"INSTALLFORMOBILEAPP1\",\n    \"0-4\": \"Numeric Value; The API account ID of the account your campaigns are running under. You can find this ID in your MobFox Account under My Account>Account Information.\",\n    \"1-4\": \"When tracking through a click ID, the value of this parameter should be \\\"click_id\\\" (without the quotes)\",\n    \"2-4\": \"MD5 Hash (lowercase); This should be the value you obtained from the MOBFOXCLICKID click token.\",\n    \"3-4\": \"Optionally, you can add a description for this conversion event.\"\n  },\n  \"cols\": 5,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"API Parameters - Tracking by Device Identifier / UDID\"\n}\n[/block]\nIf you would like to track conversions / app installs by posting one or more of the supported Unique Device Identifiers to our API, please make sure that your campaign is targeted only to traffic that supports the chosen device identifiers. You can do this in the \"UDID\" section when setting up your campaign's ad group.\n\nNote that although only one unique device identifier is required by the API, we recommend you include as many identifiers as possible for any given conversion event. Example: For Android, we recommend you pass back both the Android_ID as well as the Device ID from Telephony Manager.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Required\",\n    \"h-2\": \"Platform\",\n    \"h-3\": \"Example Input\",\n    \"h-4\": \"Description\",\n    \"0-0\": \"account_id\",\n    \"0-1\": \"Yes\",\n    \"0-2\": \"All Platforms\",\n    \"0-3\": \"154\",\n    \"0-4\": \"Numeric Value; The API account ID of the account your campaigns are running under. You can find this ID in your MobFox Account under My Account>Account Information.\",\n    \"1-0\": \"tracking_type\",\n    \"2-0\": \"app_key\",\n    \"3-0\": \"ios_ifa\",\n    \"4-0\": \"android_gaid\",\n    \"1-1\": \"Yes\",\n    \"2-1\": \"Yes\",\n    \"3-1\": \"One identifier required\",\n    \"4-1\": \"One identifier required\",\n    \"1-2\": \"All Platforms\",\n    \"2-2\": \"All Platforms\",\n    \"3-2\": \"iOS >= 6\",\n    \"4-2\": \"Android\",\n    \"1-3\": \"device_id\",\n    \"2-3\": \"ANGRYBIRDSRIO\",\n    \"3-3\": \"n/a\",\n    \"4-3\": \"n/a\",\n    \"1-4\": \"When tracking with a device ID, the value of this parameter should be \\\"device_id\\\" (without the quotes)\",\n    \"2-4\": \"A unique identifier for the app that is being promoted to avoid duplicate conversions. This can be set to any value but should be unique per app that is being promoted on your account.\",\n    \"3-4\": \"iOS Identifier for Advertisers; 36 hexadecimal characters, including hyphens\",\n    \"4-4\": \"Google Advertising ID\",\n    \"5-0\": \"ios_udid\",\n    \"6-0\": \"android_id\",\n    \"7-0\": \"android_device_id\",\n    \"8-0\": \"openudid\",\n    \"5-1\": \"One identifier required\",\n    \"6-1\": \"One identifier required\",\n    \"7-1\": \"One identifier required\",\n    \"8-1\": \"One identifier required\",\n    \"9-0\": \"mac_md5\",\n    \"10-0\": \"mac_sha1\",\n    \"11-0\": \"conversion_description\",\n    \"9-1\": \"One identifier required\",\n    \"10-1\": \"One identifier required\",\n    \"11-1\": \"No\",\n    \"5-2\": \"< IOS 6\",\n    \"6-2\": \"Android\",\n    \"7-2\": \"Android\",\n    \"8-2\": \"Any\",\n    \"9-2\": \"Any\",\n    \"10-2\": \"Any\",\n    \"11-2\": \"All Platforms\",\n    \"5-3\": \"n/a\",\n    \"6-3\": \"n/a\",\n    \"7-3\": \"n/a\",\n    \"8-3\": \"n/a\",\n    \"9-3\": \"n/a\",\n    \"10-3\": \"n/a\",\n    \"11-3\": \"INSTALLFORMOBILEAPP1\",\n    \"5-4\": \"iOS UDID; 40 hexadecimal characters\",\n    \"6-4\": \"16 hexadecimal characters, the Secure.ANDROID_ID\",\n    \"7-4\": \"The Android Device ID (IMEI) from TELEPHONYMANAGER\",\n    \"8-4\": \"The OpenUDID value from www.openudid.org\",\n    \"9-4\": \"A MD5 hash of the device's MAC Address\",\n    \"10-4\": \"An SHA1 hash of the device's MAC Address\",\n    \"11-4\": \"Optionally, you can add a description for this conversion event.\"\n  },\n  \"cols\": 5,\n  \"rows\": 12\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Sample API Calls\"\n}\n[/block]\nYou can find examples for both Click_ID as well as device identifier based Conversion Tracking API Calls below.\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"http://my.mobfox.com/conversion.track.php?account_id=134&click_id=1aabac6d068eef6a7bad3fdf50a05cc8&tracking_type=click_id\",\n      \"language\": \"http\",\n      \"name\": \"Example API Call - CLICK_ID\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"http://my.mobfox.com/conversion.track.php?account_id=134&app_key=ANGRYBIRDSRIO&tracking_type=device_id&android_id=9774d56d682e549c&android_device_id=123456786543210\",\n      \"language\": \"text\",\n      \"name\": \"Example API Call - Android Install Tracking\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Sample Responses\"\n}\n[/block]\nThe API will always return an XML response to a Conversion Tracking request. You can find a collection of successful and unsuccessful sample responses below.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Sample Success Response - Conversion Found (XML):\"\n}\n[/block]\nIf the conversion tracking request has been successful and a conversion was found, the following response will be returned.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<response status=\\\"success\\\">CONVERSION FOUND</response>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Sample Responses\"\n}\n[/block]\nThe API will always return an XML response to a Conversion Tracking request. You can find a collection of successful and unsuccessful sample responses below.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Sample Success Response - Conversion Found (XML):\"\n}\n[/block]\nIf the conversion tracking request has been successful and a conversion was found, the following response will be returned.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<response status=\\\"success\\\">NO CONVERSION FOUND</response>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Sample Error Response (XML):\"\n}\n[/block]\nIf one or more of the required GET/POST parameters are missing or incorrect, an error response will be returned with a description on what went wrong.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<response status=\\\"error\\\">\\n<error code=\\\"1\\\">Invalid API Account ID. The account ID should be a numeric value. You can find your API Account ID in your MobFox Account under My Account>Account Information.</error>\\n</response>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"conversion-tracking-api","type":"basic","title":"Conversion Tracking API"}

Conversion Tracking API


The MobFox conversion tracking API allows you to track both app installs as well as and other types conversion events that result from running your mobile advertising campaigns on MobFox. Once you are setup to post-back conversion data to our API, you will be able to see the total number of conversions, cost per conversion, and other useful information directly in the MobFox campaign management dashboard. Once conversions are being logged, you will also be able to optimize your mobile advertising campaigns towards your target CPA/CPI by excluding poor-performing Publishers and Devices from your campaign. [block:api-header] { "type": "basic", "title": "API URL and GET/POST Parameters" } [/block] You can call the MobFox Conversion tracking API URL using either GET or POST as the request method. Depending on the type of conversion you are posting to the API, there are a number of obligatory and optional parameters that need to be included when calling the API. [block:api-header] { "type": "basic", "title": "API Base URL" } [/block] [block:code] { "codes": [ { "code": "http://my.mobfox.com/conversion.track.php?{requestParameters}", "language": "http" } ] } [/block] [block:api-header] { "type": "basic", "title": "API Parameters - Tracking by Click ID (Token)" } [/block] If you are using the MobFox Click Token "MFOXCLICKID" (learn more about click tokens here) in your ad unit click URL's you can post the collected value from this token back to our Conversion Tracking API once a conversion has been generated. The below parameters are required in order to track conversions by Click ID. [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Required", "h-2": "Platform", "h-3": "Example Input", "h-4": "Description", "0-0": "account_id", "1-0": "tracking_type", "2-0": "click_id", "3-0": "conversion_description", "0-1": "Yes", "1-1": "Yes", "2-1": "Yes", "3-1": "Yes", "0-2": "All Platforms", "1-2": "All Platforms", "2-2": "All Platforms", "3-2": "All Platforms", "0-3": "154", "1-3": "click_id", "2-3": "3b3eda5569bbfb7f93d465529f5a3db0", "3-3": "INSTALLFORMOBILEAPP1", "0-4": "Numeric Value; The API account ID of the account your campaigns are running under. You can find this ID in your MobFox Account under My Account>Account Information.", "1-4": "When tracking through a click ID, the value of this parameter should be \"click_id\" (without the quotes)", "2-4": "MD5 Hash (lowercase); This should be the value you obtained from the MOBFOXCLICKID click token.", "3-4": "Optionally, you can add a description for this conversion event." }, "cols": 5, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "API Parameters - Tracking by Device Identifier / UDID" } [/block] If you would like to track conversions / app installs by posting one or more of the supported Unique Device Identifiers to our API, please make sure that your campaign is targeted only to traffic that supports the chosen device identifiers. You can do this in the "UDID" section when setting up your campaign's ad group. Note that although only one unique device identifier is required by the API, we recommend you include as many identifiers as possible for any given conversion event. Example: For Android, we recommend you pass back both the Android_ID as well as the Device ID from Telephony Manager. [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Required", "h-2": "Platform", "h-3": "Example Input", "h-4": "Description", "0-0": "account_id", "0-1": "Yes", "0-2": "All Platforms", "0-3": "154", "0-4": "Numeric Value; The API account ID of the account your campaigns are running under. You can find this ID in your MobFox Account under My Account>Account Information.", "1-0": "tracking_type", "2-0": "app_key", "3-0": "ios_ifa", "4-0": "android_gaid", "1-1": "Yes", "2-1": "Yes", "3-1": "One identifier required", "4-1": "One identifier required", "1-2": "All Platforms", "2-2": "All Platforms", "3-2": "iOS >= 6", "4-2": "Android", "1-3": "device_id", "2-3": "ANGRYBIRDSRIO", "3-3": "n/a", "4-3": "n/a", "1-4": "When tracking with a device ID, the value of this parameter should be \"device_id\" (without the quotes)", "2-4": "A unique identifier for the app that is being promoted to avoid duplicate conversions. This can be set to any value but should be unique per app that is being promoted on your account.", "3-4": "iOS Identifier for Advertisers; 36 hexadecimal characters, including hyphens", "4-4": "Google Advertising ID", "5-0": "ios_udid", "6-0": "android_id", "7-0": "android_device_id", "8-0": "openudid", "5-1": "One identifier required", "6-1": "One identifier required", "7-1": "One identifier required", "8-1": "One identifier required", "9-0": "mac_md5", "10-0": "mac_sha1", "11-0": "conversion_description", "9-1": "One identifier required", "10-1": "One identifier required", "11-1": "No", "5-2": "< IOS 6", "6-2": "Android", "7-2": "Android", "8-2": "Any", "9-2": "Any", "10-2": "Any", "11-2": "All Platforms", "5-3": "n/a", "6-3": "n/a", "7-3": "n/a", "8-3": "n/a", "9-3": "n/a", "10-3": "n/a", "11-3": "INSTALLFORMOBILEAPP1", "5-4": "iOS UDID; 40 hexadecimal characters", "6-4": "16 hexadecimal characters, the Secure.ANDROID_ID", "7-4": "The Android Device ID (IMEI) from TELEPHONYMANAGER", "8-4": "The OpenUDID value from www.openudid.org", "9-4": "A MD5 hash of the device's MAC Address", "10-4": "An SHA1 hash of the device's MAC Address", "11-4": "Optionally, you can add a description for this conversion event." }, "cols": 5, "rows": 12 } [/block] [block:api-header] { "type": "basic", "title": "Sample API Calls" } [/block] You can find examples for both Click_ID as well as device identifier based Conversion Tracking API Calls below. [block:code] { "codes": [ { "code": "http://my.mobfox.com/conversion.track.php?account_id=134&click_id=1aabac6d068eef6a7bad3fdf50a05cc8&tracking_type=click_id", "language": "http", "name": "Example API Call - CLICK_ID" } ] } [/block] [block:code] { "codes": [ { "code": "http://my.mobfox.com/conversion.track.php?account_id=134&app_key=ANGRYBIRDSRIO&tracking_type=device_id&android_id=9774d56d682e549c&android_device_id=123456786543210", "language": "text", "name": "Example API Call - Android Install Tracking" } ] } [/block] [block:api-header] { "type": "basic", "title": "Sample Responses" } [/block] The API will always return an XML response to a Conversion Tracking request. You can find a collection of successful and unsuccessful sample responses below. [block:api-header] { "type": "basic", "title": "Sample Success Response - Conversion Found (XML):" } [/block] If the conversion tracking request has been successful and a conversion was found, the following response will be returned. [block:code] { "codes": [ { "code": "<response status=\"success\">CONVERSION FOUND</response>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Sample Responses" } [/block] The API will always return an XML response to a Conversion Tracking request. You can find a collection of successful and unsuccessful sample responses below. [block:api-header] { "type": "basic", "title": "Sample Success Response - Conversion Found (XML):" } [/block] If the conversion tracking request has been successful and a conversion was found, the following response will be returned. [block:code] { "codes": [ { "code": "<response status=\"success\">NO CONVERSION FOUND</response>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Sample Error Response (XML):" } [/block] If one or more of the required GET/POST parameters are missing or incorrect, an error response will be returned with a description on what went wrong. [block:code] { "codes": [ { "code": "<response status=\"error\">\n<error code=\"1\">Invalid API Account ID. The account ID should be a numeric value. You can find your API Account ID in your MobFox Account under My Account>Account Information.</error>\n</response>", "language": "xml" } ] } [/block]