Technical Integration Documentation

Modified on Wed, 16 Aug 2023 at 04:50 PM

There are different types of integration depending on the client’s setup and preference. We distinguish between Click and Conversion Integration.


Domain Level - Click Integration

When you have an existing network your tracking links follow a specific structure

  • e.g. tracking.mycompany.com?pub=x&product=y

You may also have additional parameter that your affiliates are passing to you (click Ids, SubID, Device IDs etc.) To make things simple to integrate and to avoid that affiliate have to change their links we can emulate the format of your tracking links.


How this works

  1. We integrate on your Domain (e.g. clicks.network.com), including SSL certificate (Let's encrypt) that gets issued by us
  2. Publisher sends the Clicks in the format of the tracking platform / Domain. (e.g. clicks.network.com?offer=x&publisher=y). The parameter keys can be mapped on 24metrics side to emulate any link format.

As a result Affiliates are able to pull tracking links as before from the platform and existing tracking links don't require updating. Additional parameters are automatically redirected to the redirect / fallback URL.






Diagram: Domain Level Click Integration with Emulated Tracked Link Format





API Integration with Clicks

If you cannot / want to route the traffic through 24metrics then you can make an API request for every click to our server including IP, User Agent, Publisher, SubID etc. and we respond with the result in Json Format (25ms response time).


How it works

1. Call our Click API with the parameters for IP, User Agent, Publisher, Device ID etc. You get a full list of parameters from UI under Custom Integration > Clicks 



Example Click API Call

https://dhkwd4izck.clicks.24metrics.com?offer=test_doc&advertiser=advertiser_name&publisher=publisher_id&user_agent=Mozilla&click_ip=100.0.0.1&sub_id=abcd&browser_languages=en,es&device_id=idfa_number&referer=http://referer.com&no_redirect=true


Example Click API Call

Response:
{
"reason": "DUPLICATE_IP",
"status": "rejected"
}


2. You listen to our response and block clicks that have been flagged as rejected from our service. In this setup you decide whether you want to redirect or block rejected clicks. Our API responds within 25ms and automatically routes the requests to the closest server. For security/stability reasons we recommend implementing a circuit breaker in case the latency is above 150ms to avoid any issues in case of maintenance / technical issues. 



Extended Click API Response (only use if needed)

https://dhkwd4izck.clicks.24metrics.com?offer=test_doc&advertiser=advertiser_name&publisher=publisher_id&user_agent=Mozilla&click_ip=100.0.0.1&sub_id=abcd&browser_languages=en,es&device_id=idfa_number&referer=http://referer.com&json=true




Diagram API Integration




API Integration with Conversions

API Integration with Conversion works in a similar way as with Clicks. No Domain integration is needed as these calls are not visible to the publisher. You can use our API Builder inside 24Metrics AdSecurity Platform. 

  • go to Custom Integration > Conversion Section TAB




Example Conversion API Call

https://dhkwd4izck.postbacks.24metrics.com/?secure=11b3d02c7a95b60470fad493b0023b1b&offer=test_doc&session_time=25&conversion_ip=8.8.8.8&use_current_time=tru

Example Conversion API Response

"conversion_data": {
        "ip": "8.8.8.8",
        "ip_network": "8.8.8.8/32",
        "country": "United States",
        "country_code": "US",
        "lat": 37.751,
        "long": -97.822,
        "isp": "Google",
        "proxy_type": "DataCenterHostingProvider",
        "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36",
        "referer_categories": null,
        "is_bot": 0,
        "os_name": "OSMacOSX",
        "os_version": {
            "Major": 10,
            "Minor": 15,
            "Patch": 7
        },
        "is_old_os": 0,
        "device_type": "DeviceComputer",
        "browser_name": "BrowserChrome",
        "browser_version": {
            "Major": 103,
            "Minor": 0,
            "Patch": 0
        },
        "browser_language": [],
        "is_old_browser": 0,
        "organization_id": "5cd9a3604f223a59f1898c1c",
        "integration_id": "dhkwd4izck",
        "offer_id": "test_doc",
        "offer": "default",
        "transaction_id": "cs-274f4115-e75d-4154-9995-15e1754fc951",
        "request_time": "2022-07-13T16:45:23.278160064Z",
        "conversion_time": "2022-07-13T16:45:23.278169124Z",
        "hash": "bc595b7d54be312d91952cdf5874bf47",
        "session_time": 25,
        "conversion_ip": "8.8.8.8",
        "server_ip": "92.206.255.140",
        "revenue": 0,
        "payout": 0,
        "click_ip": "",
        "click_time": "0001-01-01T00:00:00Z",
        "filter_group_id": "tan35d2llw",
        "rejected": 1,
        "rejections": [
            "VPN",
            "DUPLICATE_IP"
        ],
        "rejected_advanced_reason": "DUPLICATE_IP",
        "rejected_simple_reason": "DUPLICATE_IP",
        "app_id": "",
        "app_version": "",
        "third_party_rejection_reason": "",
        "third_party_status": "",
        "begin_install_time": "0001-01-01T00:00:00Z",
        "finish_install_time": "0001-01-01T00:00:00Z",
        "is_click_spam": 0,
        "is_low_session_time": 1,
        "score": 400,
        "risk": "HIGH RISK"
    },
    "conversion_filter_results": {
        "filter_group_name": "Documentation Example",
        "filter_group_id": "tan35d2llw",
        "failed_filters": null,
        "results": {
            "NOT_REJECTED": [],
            "REJECTED": [
                {
                    "filter": {
                        "target": "conversion",
                        "type": "VPN",
                        "settings": {}
                    }
                },
                {
                    "meta": {},
                    "filter": {
                        "target": "conversion",
                        "type": "DUPLICATE_IP",
                        "settings": []
                    }
                }
            ]
        },
        "filter_types": [
            "VPN",
            "DUPLICATE_IP"
        ]
    },
    "conversion_type": "ConversionGeneric",
    "conversion_offer_type": "OfferNot24Metrics"





Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article