The current Clickadu API version allows you to get your account statistics.

Note: to get statistics by your traffic sources (Request_vars) you need to apply to your account manager.

How to generate an API request?

To generate an API request you should create an URL with specific parameters. Every API request starts with the link:

mceclip0.png

API request URL example:

http://v2.api.clickadu.com/partner/stats?token=<token>&parameter=<parameter>&format=<format>

Notes:

1. The first parameter to your URL should start with a '?', like ?token=abracadabra

2. Any following parameters after the '?' should start with a '&', like &timezone=UTC

Token:

A unique API token that grants you access to the account requests.

mceclip2.png

Parameters:

You can add additional parameters and filters to your API request.

The list of available parameters:

  • dateFrom: Your request starting date. The available date format: YYYY-MM-DD

  • dateTo: Your request end date. The available date format: YYYY-MM-DD

  • groupBy: Allows to group your request by different attributes: geo, day, hour, zone, site, platform, os_type, device_type. Please note that only one attribute per request is available.
    If you do not choose any attribute then groupBy=GEO is applied by default.

  • zoneId: Allows you to filter your requests by zone ID. Please note that only one zone ID per request attribute is available.

  • siteId: Allows you to filter your requests by site ID. Please note that only one site ID per request is available.

  • geo: Allows you to filter your requests by geo. Please note that only one geo per request is available.

  • format: Output data format.

  • timezone: Allows you to get data by the requested timezone. List of available timezones.

Please note that parameter syntaxis is important. Copy -> Paste the parameters to avoid API request errors.

Output format:

You can choose between JSON and XML output data format (JSON by default). Choose the one that works for you.

JSON Data Output Example:

{"stats":[{"geo":"CN","impressions":"0","money":0,"clicks":0},{"geo":"IN","impressions":"5","money":0.0079839,"clicks":2},{"geo":"IQ","impressions":"1","money":0,"clicks":0},{"geo":"MY","impressions":"0","money":0,"clicks":0},{"geo":"TN","impressions":"0","money":0,"clicks":0},{"geo":"TR","impressions":"0","money":0,"clicks":0}],"total":{"clicks":2,"impressions":6,"money":0.0079839},"filter":{"dateFrom":null,"dateTo":null,"groupBy":"geo","zoneId":null,"siteId":null,"geo":"CZ","format":"json","timezone":"UTC"}}

XML Data Output Example:

mceclip3.png
Did this answer your question?