Try Zapped free Turn every tap into a lead, a booking or a payment.Turn taps into leads and bookings. See how

Statistics

Endpoint

GET https://zapped.to/api/statistics/{vcard_id}

Authentication

An API key with the statistics:read scope (Read card statistics), sent as Authorization: Bearer YOUR_API_KEY.

Parameters Details Description
start_date Optional Start date in Y-m-d format.
end_date Optional End date in Y-m-d format.
type Optional String 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, hour
country_code Optional String Available when: type = city_name
utm_source Optional String Available when: type = utm_medium, utm_campaign
utm_medium Optional String Available when: type = utm_campaign
referrer_host Optional String Available when: type = referrer_path

Leave out a date, or send one that is not in Y-m-d format, and the range uses today as the end and 30 days ago as the start. An unknown type returns overview. Dates use the time zone of the account that owns the key. A range longer than 366 days keeps end_date and starts 366 days before it. Every type other than overview and hour returns at most 500 rows, most viewed first.

overview rows also carry contact_saves: how many times the card's contact file was downloaded on that date. A contact save is not counted as a pageview. It does not confirm the contact was added to the visitor's phone.

Example

curl --request GET \
--url 'https://zapped.to/api/statistics/{vcard_id}?start_date=2020-01-01&end_date=2021-01-01' \
--header 'Authorization: Bearer YOUR_API_KEY' \

Response example

{
    "data": [
        {
            "pageviews": 20,
            "visitors": 5,
            "contact_saves": 2,
            "formatted_date": "2021-01"
        },
        {
            "pageviews": 35,
            "visitors": 10,
            "contact_saves": 4,
            "formatted_date": "2021-02"
        },
        {
            "pageviews": 50,
            "visitors": 25,
            "contact_saves": 7,
            "formatted_date": "2021-03"
        }
    ]
}