Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
gernest committed Feb 18, 2024
1 parent fce8d7e commit 770e378
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,65 @@
- **Privacy friendly**: No cookies and fully compliant with GDPR, CCPA and PECR.


### Getting current visitors


```bash
+ curl -X GET 'http://localhost:8080/api/v1/stats/realtime/visitors?site_id=vinceanalytics.com'
6
```

### Getting aggregate metrics


```bash
+ curl -X GET 'http://localhost:8080/api/v1/stats/aggregate?metrics=visitors%2Cvisits%2Cpageviews%2Cviews_per_visit%2Cbounce_rate%2Cvisit_duration%2Cevents&site_id=vinceanalytics.com'
{
"results": {
"bounce_rate": {
"value": 0.8888888888888888
},
"events": {
"value": 10
},
"pageviews": {
"value": 10
},
"views_per_visit": {
"value": 1.1111111111111112
},
"visit_duration": {
"value": 0.0013333333333333333
},
"visitors": {
"value": 8
},
"visits": {
"value": 9
}
}
}
```


### Breaking down stats by property

```bash
+ curl -X GET 'http://localhost:8080/api/v1/stats/breakdown?metrics=visitors%2Cbounce_rate&property=browser&site_id=vinceanalytics.com'
{
"results": {
"browser": {
"Chrome Mobile": {
"bounce_rate": 0.6666666666666666,
"visitors": 6
},
"Chrome Webview": {
"bounce_rate": 1,
"visitors": 1
}
}
}
}
```

Check out the [getting started](https://vinceanalytics.com/#getting-started) instructions if you want to give `vince` a try.

0 comments on commit 770e378

Please sign in to comment.