From 96461469d6e8e46a854f35761e3766bdee345693 Mon Sep 17 00:00:00 2001 From: Palash Nigam Date: Fri, 26 Oct 2018 21:53:56 +0530 Subject: [PATCH] docs: Add analytics flag details --- docs/appbase/app.md | 61 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/docs/appbase/app.md b/docs/appbase/app.md index fb73a60..2275124 100644 --- a/docs/appbase/app.md +++ b/docs/appbase/app.md @@ -19,7 +19,7 @@ The above commands will only give basic details of the app such as its name, ID, If you want more details such as credentials and metrics, you can pass in defined switches. The full version of `app` command looks like- ```sh -abc app [-c|--creds] [-m|--metrics] [ID|Appname] +abc app [-c|--creds] [-m|--metrics] [-a| --analytics] [ID|Appname] ``` #### Example @@ -48,3 +48,62 @@ Records: 42 ``` ⭐️ It shows API calls and number of records created on a per day basis (just like the graph you see on dashboard.appbase.io). + + +### Accessing app analytics (only for paid users) + +Paid users can access analytics data for a particular app. Currently the following analytics endpoints are supported: +- overview +- noresultsearches +- popularresults +- popularsearches +- popularfilters +- geoip +- latency + +#### Example + +By default the command will ping the overview endpoint + +```sh +> abc app -a MyCoolApp + +Analytics(Overview) Results: +No Result Searches ++-------+------+ +| COUNT | KEY | ++-------+------+ +| 1 | blah | +| 1 | gurr | ++-------+------+ +No Result Searches ++-------+--------------+ +| COUNT | KEY | ++-------+--------------+ +| 1 | gru | +| ... | ... | +| 1 | wonder woman | +| 1 | wonderland | ++-------+--------------+ +Search Volume Results ++-------+---------------+---------------------+ +| COUNT | KEY | DATE-AS-STR | ++-------+---------------+---------------------+ +| 7 | 1540512000000 | 2018/10/26 00:00:00 | ++-------+---------------+---------------------+ +``` + +To ping other analytics endpoints the `endpoint` flag can be used. For example + +```sh +> abc app -a --endpoint=latency MyCoolApp + +Analytics(Latency) Results: ++-------+-----+ +| COUNT | KEY | ++-------+-----+ +| 2 | 0 | +| .. | .. | +| 0 | 10 | ++-------+-----+ +``` \ No newline at end of file -- GitLab