A simple tracking and counting tool for site events. This is to be used for auditing.
Http
If i miss something or you have something interesting, please be part of this project. Let me know! My contact is at the end.
Project dependencies are managed using Dep. Read more about Dep.
- Install dependencies:
dep ensure
- Update dependencies:
dep ensure -update
Saving location by street
Method: POST
Route: http://localhost:8001/api/v1/tracking/event
Body:
{
"category": "category",
"action": "action",
"label": "label",
"value": 1,
"viewer": "joao",
"viewed": "jessica",
"street": "rua particular de monsanto",
"meta_data": {
"teste_1": "teste",
"teste_2": 1,
"teste_3": 1.1
}
}
Saving location by latitude, longitude
Method: POST
Route: http://localhost:8001/api/v1/tracking/event
Body:
{
"category": "category",
"action": "action",
"label": "label",
"value": 1,
"viewer": "joao",
"viewed": "jessica",
"latitude": 41.1718238,
"longitude": -8.6186277,
"meta_data": {
"teste_1": "teste",
"teste_2": 1,
"teste_3": 1.1
}
}
go get github.com/joaosoft/tracking
This examples are available in the project at tracking/examples
func main() {
m, err := tracking.NewTracking()
if err != nil {
panic(err)
}
if err := m.Start(); err != nil {
panic(err)
}
}
Facebook: https://www.facebook.com/joaosoft
LinkedIn: https://www.linkedin.com/in/jo%C3%A3o-ribeiro-b2775438/