The website analytics at a glance
GET
/console/analytics-sso/overview
const url = 'https://example.com/console/analytics-sso/overview';const options = { method: 'GET', headers: {cookie: 'bottle.session_token=<bottle.session_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/console/analytics-sso/overview \ --cookie bottle.session_token=<bottle.session_token>What the console’s analytics page shows before anybody opens Umami: for each set of figures, whether it can be opened here, and the last seven days in counts (visitors, visits, page views, bounces, time) with the five most visited paths and referring sites. Nothing about any one visitor; the office app’s paths come with ids already taken out. Read from Umami with Bottle’s own login, so only where Umami sign-in is set up (signIn: umami); otherwise every site says signInOff and opening lands on the share page. Kept for five minutes. Answers 404 where the analytics are not set up.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Each set of figures, and how opening them lands
Media typeapplication/json
object
signIn
required
string
from
required
string format: date-time
to
required
string format: date-time
sites
required
Array<object>
object
target
required
string
available
required
boolean
state
required
string
figures
required
object
visitors
required
integer
visits
required
integer
pageviews
required
integer
bounces
required
integer
totalSeconds
required
integer
topPages
required
Array<object>
object
path
required
string
views
required
integer
topReferrers
required
Array<object>
object
referrer
required
string
visits
required
integer
Example
{ "signIn": "umami", "sites": [ { "target": "site", "state": "ready" } ]}Not signed in
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not Bottle staff, or no two-step sign-in
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}The analytics are not set up on this deployment
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}