You can easily track any events type, single (f.e. mouse click, audio & video start, ad start & stop), repeatable (f.e. audio & video progress) and get reports for particular events and resources
- Events tracking
- Reports:
- Total number of events by a requested event type for a given period
- Histogram for a given period by the given interval
You can run app on an existing LAMP/LEMP stack or with the provided Docker compose configuration
- Build containers $ cd /project_root && docker-compose build
- Run docker $ docker-compose up -d
- Login to the workspace container $ docker-compose run workspace bash Repeat steps from
- Create a new Elasticsearch index, from the project root: $ curl -XPUT "https://elastichost/indexname/typename" -d @database/esmappings.json
- Install project dependencies $ php composer.phar install
- Create and fill with the appropriate values your .env file $ cp .env.example .env
- Cache routes $ php artisan route:cache
API documentation available with a http://swagger.io/
$ curl -H "Content-Type: application/json" -X POST "https://example.com/api/stats/pulse" -d '{"event":"audiostart", "domain":"https://video.example.com", "uid":"123"}'
Response has a "session" key which can be used as a session for sending an associated events, f.e. audio progress for the same audio or video
Available at
- https://example.com/api/count - Total events
- https://example.com/api/histogram - Date histogram