API Docs

Get Stats/Analytics (yearly) GET

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

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

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
year string Query Required Enter 4-digits of year (YYYY). Example: 2020
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?tag=tag1&year=2020
2. https://t2mio.com/api/v1/stats?url_keys=key1,key2,key3&year=2020&timezone=-06:00

Response

{
  "status": 200,
  "message": "ok",
  "data": {
    "clicks_total": 2290,
    "clicks_unique": 1781,
    "clicks_repeated": 509,
    "clicks_breakdown": {
      "2022": {
        "1": 199,
        "2": 111,
        "3": 123,
        "4": 486,
        "5": 233,
        "6": 312,
        "7": 216,
        "8": 323,
        "9": 239,
        "10": 48,
        "11": 0,
        "12": 0
      }
    },
    "browser": {
      "Chrome": "1950",
      "Safari": "131",
      "unknown.": "62",
      "Firefox": "53",
      "Mozilla": "27",
      "Opera": "26",
      "Internet Explorer": "24",
      "iPhone": "12",
      "Lynx": "2",
      "Yandex": "2",
      "iPad": "1"
    },
    "country": {
      "US": "378",
      "BR": "304",
      "CO": "202",
      "TH": "170",
      "MX": "152",
      "AR": "90",
      "CA": "75",
      "IN": "71",
      ...
    },
    "device": {
      "Desktop": "656",
      "Tablet": "11",
      "Mobile": "1623"
    },
    "languages": {},
    "platform": {
      "Android": "1489",
      "Windows": "359",
      "iPhone": "140",
      "Apple": "133",
      "Linux": "70",
      "unknown.": "59",
      "iPhone/iPad": "28",
      "Chrome OS": "8",
      "iPad": "1",
      "Java/Android": "1",
      "Postman": "1",
      "Terminal": "1"
    },
    "referrer": {
      "Direct": 2263,
      "www.google.com": "20",
      "facebook.com": "2",
      "www.t2mio.com": "2",
      "com.google.android.gm": "1",
      "org.telegram.messenger": "2"
    },
    "timezone": {
      "America/Sao_Paulo": "174",
      "America/Bogota": "173",
      "Asia/Bangkok": "166",
      "America/New_York": "149",
      "America/Mexico_City": "105",
      "America/Chicago": "85",
      "America/Los_Angeles": "65",
      "Asia/Kolkata": "56",
      "America/Lima": "54",
      "America/Fortaleza": "48",
      ...
    }
  }
}