REST API
Stats
Stats: 2 endpoints of the REST API.
/links/{link}/statsGet the counters of a link
The environment counters for one link plus the top 5 values of OS, country, in-app browser and match method. A link of another environment is a 404.
Secret key scope (any of): analytics:read
Parameters
| Field | Type | Description |
|---|---|---|
link (path)required | string | The ID of the link. |
range (query) | "7d" | "30d" | The last 7 or 30 project-local days, today included. Default |
Responses
200 The link counters.
| Field | Type | Description |
|---|---|---|
rangerequired | "7d" | "30d" | |
fromrequired | string (date) | First day of the range (project-local). |
torequired | string (date) | Last day of the range, today (project-local). |
timezonerequired | string | IANA zone that defines a day. |
totalsrequired | object | |
totals.clicksrequired | integer | Non-bot clicks. |
totals.unique_clicksrequired | integer | Visitors, counted once per link and day (approximate by design). |
totals.installsrequired | integer | New installs: first opens that are not reinstalls. |
totals.attributed_installsrequired | integer | New installs credited to a link by a deterministic match (probabilistic matches excluded). |
totals.first_opensrequired | integer | Every first app open, reinstalls included. |
totals.reengagementsrequired | integer | Opens of an already installed app through a link. |
totals.eventsrequired | integer | Custom events received. |
seriesrequired | object[] | One point per day, zero-filled. |
series[].clicksrequired | integer | Non-bot clicks. |
series[].unique_clicksrequired | integer | Visitors, counted once per link and day (approximate by design). |
series[].installsrequired | integer | New installs: first opens that are not reinstalls. |
series[].attributed_installsrequired | integer | New installs credited to a link by a deterministic match (probabilistic matches excluded). |
series[].first_opensrequired | integer | Every first app open, reinstalls included. |
series[].reengagementsrequired | integer | Opens of an already installed app through a link. |
series[].eventsrequired | integer | Custom events received. |
series[].dayrequired | string (date) | Project-local calendar day. |
freshnessrequired | object | |
freshness.as_ofrequired | string (date-time) | null | When the rollups last wrote data for this scope; null when there is none. |
freshness.caught_uprequired | boolean | True when the rollups wrote within the last 10 minutes. |
breakdownsrequired | object | Top 5 values each. |
breakdowns.osrequired | object[] | |
breakdowns.os[].valuerequired | string | null | The value; null is unknown (os, country), a regular browser (in_app_browser) or an organic install (match_method). |
breakdowns.os[].clicksrequired | integer | Non-bot clicks with this value. |
breakdowns.os[].unique_clicksrequired | integer | Visitors with this value. |
breakdowns.os[].installsrequired | integer | Installs credited to the link with this value. |
breakdowns.countryrequired | object[] | |
breakdowns.country[].valuerequired | string | null | The value; null is unknown (os, country), a regular browser (in_app_browser) or an organic install (match_method). |
breakdowns.country[].clicksrequired | integer | Non-bot clicks with this value. |
breakdowns.country[].unique_clicksrequired | integer | Visitors with this value. |
breakdowns.country[].installsrequired | integer | Installs credited to the link with this value. |
breakdowns.in_app_browserrequired | object[] | |
breakdowns.in_app_browser[].valuerequired | string | null | The value; null is unknown (os, country), a regular browser (in_app_browser) or an organic install (match_method). |
breakdowns.in_app_browser[].clicksrequired | integer | Non-bot clicks with this value. |
breakdowns.in_app_browser[].unique_clicksrequired | integer | Visitors with this value. |
breakdowns.in_app_browser[].installsrequired | integer | Installs credited to the link with this value. |
breakdowns.match_methodrequired | object[] | |
breakdowns.match_method[].valuerequired | string | null | The value; null is unknown (os, country), a regular browser (in_app_browser) or an organic install (match_method). |
breakdowns.match_method[].clicksrequired | integer | Non-bot clicks with this value. |
breakdowns.match_method[].unique_clicksrequired | integer | Visitors with this value. |
breakdowns.match_method[].installsrequired | integer | Installs credited to the link with this value. |
Example
curl -X GET "https://api.becklinks.com/v1/links/{link}/stats" \
-H "Authorization: Bearer $SECRET_KEY"/stats/summaryGet the environment counters
Clicks, unique clicks, installs, attributed installs (deterministic matches only), first opens, re-engagements and events of the last 7 or 30 project-local days, with a zero-filled daily series. Read from the rollups, so the newest minutes may be missing (see freshness).
Secret key scope (any of): analytics:read
Parameters
| Field | Type | Description |
|---|---|---|
range (query) | "7d" | "30d" | The last 7 or 30 project-local days, today included. Default |
Responses
200 The counters.
| Field | Type | Description |
|---|---|---|
rangerequired | "7d" | "30d" | |
fromrequired | string (date) | First day of the range (project-local). |
torequired | string (date) | Last day of the range, today (project-local). |
timezonerequired | string | IANA zone that defines a day. |
totalsrequired | object | |
totals.clicksrequired | integer | Non-bot clicks. |
totals.unique_clicksrequired | integer | Visitors, counted once per link and day (approximate by design). |
totals.installsrequired | integer | New installs: first opens that are not reinstalls. |
totals.attributed_installsrequired | integer | New installs credited to a link by a deterministic match (probabilistic matches excluded). |
totals.first_opensrequired | integer | Every first app open, reinstalls included. |
totals.reengagementsrequired | integer | Opens of an already installed app through a link. |
totals.eventsrequired | integer | Custom events received. |
seriesrequired | object[] | One point per day, zero-filled. |
series[].clicksrequired | integer | Non-bot clicks. |
series[].unique_clicksrequired | integer | Visitors, counted once per link and day (approximate by design). |
series[].installsrequired | integer | New installs: first opens that are not reinstalls. |
series[].attributed_installsrequired | integer | New installs credited to a link by a deterministic match (probabilistic matches excluded). |
series[].first_opensrequired | integer | Every first app open, reinstalls included. |
series[].reengagementsrequired | integer | Opens of an already installed app through a link. |
series[].eventsrequired | integer | Custom events received. |
series[].dayrequired | string (date) | Project-local calendar day. |
freshnessrequired | object | |
freshness.as_ofrequired | string (date-time) | null | When the rollups last wrote data for this scope; null when there is none. |
freshness.caught_uprequired | boolean | True when the rollups wrote within the last 10 minutes. |
Example
curl -X GET "https://api.becklinks.com/v1/stats/summary" \
-H "Authorization: Bearer $SECRET_KEY"