สถิติลิงก์

GET https://digily.link/api/statistics/
curl --request GET \
--url 'https://digily.link/api/statistics/' \
--header 'Authorization: Bearer {api_key}' \
พารามิเตอร์ รายละเอียด คำอธิบาย
start_date ไม่บังคับ สตริง วันที่เริ่มต้นในรูปแบบ Y-m-d.
end_date ไม่บังคับ สตริง วันที่สิ้นสุดในรูปแบบ Y-m-d .
project_id ไม่บังคับ จำนวนเต็ม
type ไม่บังคับ สตริง ค่าที่อนุญาต: overview, entries, referrer_host, referrer_path, crawler, continent_code, country_code, region_name, city_name, timezone, os_name, browser_name, device_type, browser_language, utm_source, utm_medium, utm_campaign, hour, weekday, visitor_type, acquisition_channel
continent_code ไม่บังคับ สตริง พร้อมใช้งานเมื่อ: type = country_code
country_code ไม่บังคับ สตริง พร้อมใช้งานเมื่อ: type = region_name, city_name
region_name ไม่บังคับ สตริง พร้อมใช้งานเมื่อ: type = city_name
utm_source ไม่บังคับ สตริง พร้อมใช้งานเมื่อ: type = utm_medium, utm_campaign
utm_medium ไม่บังคับ สตริง พร้อมใช้งานเมื่อ: type = utm_campaign
referrer_host ไม่บังคับ สตริง พร้อมใช้งานเมื่อ: type = referrer_path
referrer_type ไม่บังคับ สตริง พร้อมใช้งานเมื่อ: type = referrer_host ค่าที่อนุญาต: all, ai, social_media, search_engines, other_websites
crawler_type ไม่บังคับ สตริง พร้อมใช้งานเมื่อ: type = crawler ค่าที่อนุญาต: all, ai, search_engines
{
    "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"
        }
    ],
    "meta": {
        "page": 1,
        "results_per_page": 25,
        "total": 1,
        "total_pages": 1
    },
    "links": {
        "first": "https://digily.link/api/statistics?page=1",
        "last": "https://digily.link/api/statistics?page=1",
        "next": null,
        "prev": null,
        "self": "https://digily.link/api/statistics?page=1"
    }
}
GET https://digily.link/api/statistics/{link_id}
พารามิเตอร์ รายละเอียด คำอธิบาย
start_date ไม่บังคับ สตริง วันที่เริ่มต้นในรูปแบบ Y-m-d.
end_date ไม่บังคับ สตริง วันที่สิ้นสุดในรูปแบบ Y-m-d .
type ไม่บังคับ สตริง ค่าที่อนุญาต: overview, entries, referrer_host, referrer_path, crawler, continent_code, country_code, region_name, city_name, timezone, os_name, browser_name, device_type, browser_language, utm_source, utm_medium, utm_campaign, hour, weekday, visitor_type, acquisition_channel
continent_code ไม่บังคับ สตริง พร้อมใช้งานเมื่อ: type = country_code
country_code ไม่บังคับ สตริง พร้อมใช้งานเมื่อ: type = region_name, city_name
region_name ไม่บังคับ สตริง พร้อมใช้งานเมื่อ: type = city_name
utm_source ไม่บังคับ สตริง พร้อมใช้งานเมื่อ: type = utm_medium, utm_campaign
utm_medium ไม่บังคับ สตริง พร้อมใช้งานเมื่อ: type = utm_campaign
referrer_host ไม่บังคับ สตริง พร้อมใช้งานเมื่อ: type = referrer_path
referrer_type ไม่บังคับ สตริง พร้อมใช้งานเมื่อ: type = referrer_host ค่าที่อนุญาต: all, ai, social_media, search_engines, other_websites
crawler_type ไม่บังคับ สตริง พร้อมใช้งานเมื่อ: type = crawler ค่าที่อนุญาต: all, ai, search_engines
curl --request GET \
--url 'https://digily.link/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"
        }
    ]
}