API Docs

Get Stats/Analytics (Geo) GET

This endpoint allows you to get a country's geo-location stats/analytics data for a single tag or list of URLs for a given date range.

https://t2mio.com/api/v1/stats/country/geo

Request

Parameter Type Position Constraint Description
apikey string Header Required Your 20-30 characters unique api key.
apisecret string Header Required Your 12-20 characters unique api secret.
iso_code string Query Required Enter 2-char ISO country code. Example: CA for Canada.
tag
or
url_keys
string Query Required Enter the tag name for which you want to see the stats data.
or
Enter a comma-separated list of short URL keys (slashtags only) for which you want to see the stats data. Max 100 keys.
For example, your short URLs are:
  • https://yourdomain.co/offer2020
  • https://yourdomain.co/Ghkr3dU
Then url_keys value can be offer2020,Ghkr3dU
start_date string Query Required Enter the start date in ISO 8601 format (YYYY-MM-DD). Example: 2020-09-08
end_date string Query Required Enter the end date in ISO 8601 format (YYYY-MM-DD). Example: 2020-09-08
timezone string Query Optional Enter the timezone in UTC format. Example: -06:00. Default is +00:00

Sample GET requests

1. https://t2mio.com/api/v1/stats/country/geo?iso_code=us&tag=tag1&start_date=2021-05-01&end_date=2022-05-01
2. https://t2mio.com/api/v1/stats/country/geo?iso_code=us&url_keys=key1,key2,key3&start_date=2021-05-01&end_date=2022-05-01&timezone=-06:00

Response

{
    "status": 200,
    "message": "ok",
    "data": {
        "state": {
            "New Jersey": "14",
            "New York": "10",
            "California": "10",
            "Virginia": "7",
            "Texas": "6",
            "Utah": "4",
            ...
            "Other": 55
        },
        "city": {
            "Clifton": "8",
            "Santa Clara": "6",
            "Brooklyn": "5",
            "Ashburn": "4",
            "Salt Lake City": "3",
            "North Bergen": "3",
            ...
            "Other": 20
        },
        "postalcode": {
            "07014": "8",
            "95051": "6",
            "20149": "4",
            "07047": "3",
            "08526": "2",
            "84121": "2",
            ...
            "Other": 8
        }
    }
}