Welcome to the 24metrics API Integration documentation.
This API allows you to:
24metrics provides advanced click fraud detection for your marketing campaigns, helping you:
Our API is designed to be simple to integrate while providing powerful fraud detection capabilities.
Getting started with the 24metrics API is straightforward:
curl -X GET "https://YOUR_INTEGRATION_ID.clicks.24metrics.com/?no_redirect=true&offer=campaign123&publisher=affiliate456"
{
"transaction_id": "01F3XYZ123ABC",
"status": "approved"
}
With our JavaScript Integration from the Browser, we are able to get important information for enchanced fraud detection from the user's browser such as fingerprint data, unique user id data, incongnito detection, bot detection, browser timezone and more.
If the API call is coming from a backend server, it is possible to pass the browser information to our endpoint by doing the following instructions here.
You have to add our JavaScript data generator code in to your web app or web page code to add its generated data to the click event sent to your backend server. This is an example how our function can be used to generate the data from an HTML page.
<script src="https://cdn.24metrics.com/lib/index.js">
jsData = await ASP.get24metricsData()
console.log(jsData) // send this data to your backend server
</script>
Then, you must pass this data to our endpoint in the js_check_data query parameter.
Here is a curl representation of the API call that must be executed:
curl -X GET "https://YOUR_INTEGRATION_ID.clicks.24metrics.com/?no_redirect=true&offer=campaign123&publisher=affiliate456&js_check_data=JS_CHECK_DATA"
{
"transaction_id": "01F3XYZ123ABC",
"status": "approved"
}
js_check_data parameter.Create a click using the API. This is useful for integrations that do not support the 24metrics JS SDK.
| fields | string (Fields) A list of response fields that you want to appear in the response object. Separate by comma: monitoring_mode, filter_group_id, rejections, is_bot, proxy_type, redirect_url, ip, country, city, isp, asn, fingerprint, uuid |
| click_ip | string (ClickIP) The real of ip of the user that made the click. By default, the server request IP is used. |
| offer | string (Offer) The offer or campaign identifier. E.g. the value of utm_campaign |
| advertiser | string (Advertiser) The advertiser identifier. E.g. the value of utm_medium |
| publisher | string (Publisher) The affiliate identifier. E.g. the value of utm_source |
| sub_id | string (SubID) The affiliate sub ID source. The system may implement high cardinality control for this field which will result with an override value of |
| sub_id_2 | string (SubID2) The affiliate sub ID 2 source. |
| sub_id_3 | string (SubID3) The affiliate sub ID 3 source. |
| sub_id_4 | string (SubID4) The affiliate sub ID 4 source. |
| sub_id_5 | string (SubID5) The affiliate sub ID 5 source. |
| user_agent | string (UserAgent) The browser's user agent. This is taken from the HTTP headers by default. |
| referer | string (Referer) The Referer URL of the click. |
| keyword | string (Keyword) For search campaigns. This is used in Keyword Filtering. E.g. the value of utm_term |
| js_check_data | string (Recommended if click is done from the browser) In base64 format. The output of the 24metrics JS SDK code |
| secure_code | string If you enabled the Click Secure Code feature, pass the secure code here. |
| device_id | string (DeviceID) The user device id. This can be the Google AID or Apple IDFA. This is used for Device ID validation filtering. |
| external_transaction_id | string (ExternalTxID) If the source of the click is coming from an affiliate tracking platform, pass the transaction ID here. |
| click_time | number The click time in UTC UNIX time format. If not passed, the current time in UTC is used. This time must not be in the future |
| transaction_id | string The transaction id. You can use this to find the data from the Reports. |
| status | string Enum: "rejected" "approved" The result of the fraud detection. |
| reason | string If status is rejected, this is the primary reason why. Please note that the reasons from the Reports Pages are renamed for humans. You can find the full list of reasons at https://help.24metrics.com/en/api-documentation#fraud-detection-reasons |
{- "transaction_id": "string",
- "status": "rejected",
- "reason": "string"
}Create an impression using the API. This is useful for integrations that do not support the 24metrics JS SDK.
| impression_ip | string (ImpressionIP) The real ip of the user that made the impression. By default, the server request IP is used. |
| offer | string (Offer) The offer or campaign identifier. E.g. the value of utm_campaign |
| advertiser | string (Advertiser) The advertiser identifier. E.g. the value of utm_medium |
| publisher | string (Publisher) The affiliate identifier. E.g. the value of utm_source |
| sub_id | string (SubID) The affiliate sub ID source. The system may implement high cardinality control for this field which will result with an override value of |
| sub_id_2 | string (SubID2) The affiliate sub ID 2 source. |
| sub_id_3 | string (SubID3) The affiliate sub ID 3 source. |
| sub_id_4 | string (SubID4) The affiliate sub ID 4 source. |
| sub_id_5 | string (SubID5) The affiliate sub ID 5 source. |
| user_agent | string (UserAgent) The browser's user agent. This is taken from the HTTP headers by default. |
| referer | string (Referer) The Referer URL of the click. |
| keyword | string (Keyword) For search campaigns. This is used in Keyword Filtering. E.g. the value of utm_term |
| js_check_data | string (Recommended if click is done from the browser) In base64 format. The output of the 24metrics JS SDK code |
| secure_code | string If you enabled the Click Secure Code feature, pass the secure code here. |
| device_id | string (DeviceID) The user device id. This can be the Google AID or Apple IDFA. This is used for Device ID validation filtering. |
| external_transaction_id | string (ExternalTxID) If the source of the click is coming from an affiliate tracking platform, pass the transaction ID here. |
| impression_time | number The impression time in UTC UNIX time format. If not passed, the current time in UTC is used. This time must not be in the future |
| transaction_id | string The transaction id. You can use this to find the data from the Reports. |
| status | string Enum: "rejected" "approved" The result of the fraud detection. |
| reason | string If status is rejected, this is the primary reason why. Please note that the reasons from the Reports Pages are renamed for humans. You can find the full list of reasons at https://help.24metrics.com/en/api-documentation#fraud-detection-reasons |
{- "transaction_id": "string",
- "status": "rejected",
- "reason": "string"
}| secure_code required | string The conversion authentication secure code. |
| offer | string (Offer) The offer or campaign identifier. E.g. the value of utm_campaign |
| advertiser | string (Advertiser) The advertiser identifier. E.g. the value of utm_medium |
| publisher | string (Publisher) The affiliate identifier. E.g. the value of utm_source |
| sub_id | string (SubID) The affiliate sub ID source. The system may implement high cardinality control for this field which will result with an override value of |
| user_agent | string (UserAgent) The browser's user agent. This is taken from the HTTP headers by default. |
| conversion_ip | string The user IP of the conversion. By default, the HTTP client IP is used. |
| click_ip | string (ClickIP) The real of ip of the user that made the click. By default, the server request IP is used. |
| external_transaction_id | string (ExternalTxID) If the source of the click is coming from an affiliate tracking platform, pass the transaction ID here. |
| conversion_time required | number The conversion time in UNIX time format. This is required if |
| use_current_time | boolean If set to |
| click_time | number The click time in UTC UNIX time format. If not passed, the current time in UTC is used. This time must not be in the future |
| session_time | number The duration from click time to conversion time in seconds. Do not use this if |
| server_ip | string By default, |
| purchase_value | number <float> Purchase value of an item |
| revenue | number <float> Revenue value |
| payout | number <float> Affiliate payout value |
| app_id | string (Optional) Pass in valid iOS or Android ID format. Useful for app version filtering. |
| app_version | string (Optional) Pass in valid iOS or Android version format. Useful for app version filtering. |
| begin_install_time | string (Optional) UNIX Time format. For tracking install timing with |
| finish_install_time | string (Optional) UNIX Time format. For tracking install timing |
| third_party_rejected_reason | string Use this if the conversion has an associated non-24metrics rejection reason for tracking purposes. |
| transaction_id | string The transaction id. You can use this to find the data from the Reports. |
| status | string Enum: "rejected" "approved" The result of the fraud detection. |
| reason | string If status is rejected, this is the primary reason why. Please note that the reasons from the Reports Pages are renamed for humans. You can find the full list of reasons at https://help.24metrics.com/en/api-documentation#fraud-detection-reasons |
{- "transaction_id": "string",
- "status": "rejected",
- "reason": "string"
}