สถิติลิงก์

GET https://1rl.io/api/statistics/{link_id}
พารามิเตอร์ รายละเอียด คำอธิบาย
start_date จำเป็น วันที่เริ่มต้นในรูปแบบ Y-m-d
end_date จำเป็น วันที่สิ้นสุดในรูปแบบ Y-m-d
type ไม่บังคับ สตริง ค่าที่อนุญาต: overview, referrer_host, referrer_path, continent_code, country_code, city_name, os_name, browser_name, device_type, browser_language, utm_source, utm_medium, utm_campaign, hour
country_code ไม่บังคับ สตริง มีให้บริการเมื่อ: type = city_name
utm_source ไม่บังคับ สตริง มีให้บริการเมื่อ: type = utm_medium, utm_campaign
utm_medium ไม่บังคับ สตริง มีให้บริการเมื่อ: type = utm_campaign
referrer_host ไม่บังคับ สตริง มีให้บริการเมื่อ: type = referrer_path
curl --request GET \
--url 'https://1rl.io/api/statistics/{link_id}?start_date=2020-01-01&end_date=2021-01-01' \
--header 'Authorization: Bearer {api_key}' \
{
    "data": [
        {
            "pageviews": 20,
            "visitors": 5,
            "formatted_date": "2021-01"
        },
        {
            "pageviews": 35,
            "visitors": 10,
            "formatted_date": "2021-02"
        },
        {
            "pageviews": 50,
            "visitors": 25,
            "formatted_date": "2021-03"
        }
    ]
}