API Docs

Get Stats/Analytics GET DEPRECATED

This endpoint allows you to get stats/analytics data for a single tag or list of URLs for a given date range.

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

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.
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
date
or
date_range
string Query Required Enter the date in ISO 8601 format. Example: 2020-09-08T15:10:05-04:00.
or
Enter the comma separated date range in ISO 8601 format. Max 32 days range. Example: 2020-09-08T00:00:00-04:00,2020-10-08T23:59:59-04:00.

Sample GET requests

1. https://t2mio.com/api/v1/stats?tag=tag1&date=2020-09-08T00:00:00-00:00
2. https://t2mio.com/api/v1/stats?url_keys=key1,key2,key3&date=2020-09-08T00:00:00-00:00
3. https://t2mio.com/api/v1/stats?tag=tag1&date_range=2020-09-08T00:00:00-00:00,2020-09-08T23:59:59-00:00
4. https://t2mio.com/api/v1/stats?url_keys=key1,key2,key3&date_range=2020-09-08T00:00:00-00:00,2020-09-08T23:59:59-00:00

Response

{
    "status": 200,
    "message": "ok",
    "data": {
        "total_clicks": 16,
        "device": {
            "Desktop": "14",
            "Mobile": "2"
        },
        "browser": {
            "Chrome": "9",
            "unknown.": "2",
            "Opera": "2",
            "Firefox": "1",
            "Internet Explorer": "1",
            "Mozilla": "1"
        },
        "platform": {
            "Windows": "10",
            "Bot": "3",
            "Android": "2",
            "Apple": "1"
        },
        "country": {
            "US": "9",
            "GB": "3",
            "DE": "1",
            "GR": "1",
            "ID": "1",
            "TW": "1"
        },
        "referrer": {
            "Direct": 13,
            "owws.com": "2",
            "google.com": "1"
        }
    }
}

or

{
    "status": 200,
    "message": "ok",
    "data": {
        "total_clicks": 3789,
        "device": {
            "Desktop": "3720",
            "Mobile": "69"
        },
        "browser": {
            "unknown.": "3592",
            "Chrome": "103",
            "Firefox": "41",
            "Mozilla": "28",
            "Safari": "7",
            "Opera": "6",
            "Internet Explorer": "4",
            "Bing Bot": "2",
            "Edge": "2",
            "Yandex": "2",
            "Opera Mini": "1",
            "Vivalidi": "1"
        },
        "platform": {
            "Terminal": "3538",
            "Windows": "85",
            "Bot": "73",
            "Android": "67",
            "Apple": "12",
            "unknown.": "11",
            "Linux": "2",
            "iPhone": "1"
        },
        "country": {
            "US": "3635",
            "CA": "31",
            "IE": "28",
            "DE": "12",
            "SG": "10",
            "GB": "10",
            "ID": "10",
            "BR": "7",
            "FR": "6",
            "KR": "4",
            "CZ": "4",
            "IN": "3",
            "MY": "2",
            "CN": "2",
            "NL": "2",
            "GR": "2",
            "MA": "2",
            "IT": "2",
            "MX": "2",
            "BD": "1",
            "IL": "1",
            "CO": "1",
            "PE": "1",
            "PA": "1",
            "HU": "1",
            "TW": "1",
            "TZ": "1",
            "unknown.": "1",
            "LV": "1",
            "EG": "1",
            "TR": "1",
            "EE": "1",
            "RU": "1",
            "PT": "1"
        },
        "referrer": {
            "Direct": 3785,
            "owws.com": "2",
            "google.com": "1",
            "www.t2mio.com": "1"
        },
        "clicks": {
            "2020-01-08": 16,
            "2020-01-09": 8,
            "2020-01-10": 24,
            "2020-01-11": 6,
            "2020-01-12": 9,
            "2020-01-13": 9,
            "2020-01-14": 6,
            "2020-01-15": 8,
            "2020-01-16": 3,
            "2020-01-17": 6,
            "2020-01-18": 12,
            "2020-01-19": 5,
            "2020-01-20": 11,
            "2020-01-21": 16,
            "2020-01-22": 4,
            "2020-01-23": 10,
            "2020-01-24": 5,
            "2020-01-25": 8,
            "2020-01-26": 57,
            "2020-01-27": 297,
            "2020-01-28": 300,
            "2020-01-29": 295,
            "2020-01-30": 297,
            "2020-01-31": 295,
            "2020-02-01": 294,
            "2020-02-02": 294,
            "2020-02-03": 293,
            "2020-02-04": 297,
            "2020-02-05": 294,
            "2020-02-06": 294,
            "2020-02-07": 304,
            "2020-02-08": 12
        }
    }
}