Statistik tautan
GET https://dijital.link/api/statistics/{link_id}
Parameter | Detail | Keterangan |
---|---|---|
start_date | Diperlukan | Start date in Y-m-d format. |
end_date | Diperlukan | End date in Y-m-d format. |
type | Opsional Rangkaian | Allowed values: 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 |
country_code | Opsional Rangkaian | Available when: type = city_name |
utm_source | Opsional Rangkaian | Available when: type = utm_medium, utm_campaign |
utm_medium | Opsional Rangkaian | Available when: type = utm_campaign |
referrer_host | Opsional Rangkaian | Available when: type = referrer_path |
curl --request GET \
--url 'https://dijital.link/api/statistics/{link_id}?start_date=2020-01-01&end_date=2021-01-01' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://dijital.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"
}
]
}