アクセス統計

GET https://koenavi.jp/api/statistics/
curl --request GET \
--url 'https://koenavi.jp/api/statistics/' \
--header 'Authorization: Bearer {api_key}' \
パラメータ 詳細 説明
start_date 任意 文字列 (String) 開始日(Y-m-d 形式。省略時は30日前)。
end_date 任意 文字列 (String) 終了日(Y-m-d 形式。省略時は今日)。
type 任意 文字列 (String) 許可される値: 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 任意 文字列 (String) 利用条件: type = country_code
country_code 任意 文字列 (String) 利用条件: type = region_name, city_name
region_name 任意 文字列 (String) 利用条件: type = city_name
utm_source 任意 文字列 (String) 利用条件: type = utm_medium, utm_campaign
utm_medium 任意 文字列 (String) 利用条件: type = utm_campaign
referrer_host 任意 文字列 (String) 利用条件: type = referrer_path
referrer_type 任意 文字列 (String) 利用条件: type = referrer_host 許可される値: all, ai, social_media, search_engines, other_websites
crawler_type 任意 文字列 (String) 利用条件: 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://koenavi.jp/api/statistics?page=1",
        "last": "https://koenavi.jp/api/statistics?page=1",
        "next": null,
        "prev": null,
        "self": "https://koenavi.jp/api/statistics?page=1"
    }
}
GET https://koenavi.jp/api/statistics/{link_id}
パラメータ 詳細 説明
start_date 任意 文字列 (String) 開始日(Y-m-d 形式。省略時は30日前)。
end_date 任意 文字列 (String) 終了日(Y-m-d 形式。省略時は今日)。
type 任意 文字列 (String) 許可される値: 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 任意 文字列 (String) 利用条件: type = country_code
country_code 任意 文字列 (String) 利用条件: type = region_name, city_name
region_name 任意 文字列 (String) 利用条件: type = city_name
utm_source 任意 文字列 (String) 利用条件: type = utm_medium, utm_campaign
utm_medium 任意 文字列 (String) 利用条件: type = utm_campaign
referrer_host 任意 文字列 (String) 利用条件: type = referrer_path
referrer_type 任意 文字列 (String) 利用条件: type = referrer_host 許可される値: all, ai, social_media, search_engines, other_websites
crawler_type 任意 文字列 (String) 利用条件: type = crawler 許可される値: all, ai, search_engines
curl --request GET \
--url 'https://koenavi.jp/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"
        }
    ]
}