@xipher wrote:
Hi all!
I am developing an open-source tool to send realtime data from Icecast and Shoutcast to Matomo. I would like to track when a user connects to a stream until he disconnects in realtime (users usually spend hours listening to a stream).
I think this could be achieved doing something similar to the Heartbeat that the JS Tracking client provides: JavaScript Tracking Client: Integrate - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3
I have not been able to find that function on the HTTP Tracking API, how can I achieve that?
Basically I want to track this:
- User connects to a stream /myradio.mp3 -> Add user to Matomo
- User is still connected -> Send heartbeat to Matomo
- [ repeat while user is connected ]
- User stop listening to the stream -> End session in Matomo
I also haven’t figured out how to mark an user as disconnected instantly. Seems like Matomo mark a user as disconnected after the “visit_standard_length” timeout is over: How is a ‘visit’ defined in Piwik? - Analytics Platform - Matomo Is there a way to actively mark a user as disconnected/session has finished so I don’t need to wait for the timeout?
Every help will be appreciated. I haven’t found any tool that covers realtime analytics for streaming servers, and I think this would be a nice addition to the open source world.
Posts: 1
Participants: 1