I’ve been transitioning to Matomo after Google Analytics dropped their UA system and rendered my old stream analytics system broken. After several attempts to get Matomo working with Icecast, I’ve developed a solution to show clients and listener duration by running a script every few minutes to generate an API URL.
Unfortunately, I’m left with an issue. Actions are being duplicated each time the script runs. So, here’s where I’m stuck:
ping=1is set in the URL, Matomo will update the same action, but no new visitors are counted.
ping=1is removed from the URL, Matomo will add new visitors but continuously add a new action each time the script runs (so I have a ton of consecutive folders).
What I’d like to do is count a new visitor but also count how long a visitor has been on a page without seeing all the consecutive folders (because it gets crowded quickly). Of course, I’m still a bit new to this, and seeing all the stacking actions may be normal behavior for Matomo, and I might not be aware of this.
My URL structure is below (omitting &s):
...matomo.php? idsite=7 rec=1 action_name=Stream%20Listener url=encoded stream URL apiv=1 urlref=encoded stream URL token_auth=token ua=user agent from script cip=ip from script