Viewer Analytics is a Twitch panel extension that displays viewer watch habits.
- Places viewers on a leaderboard based on time spent watching the streamer.
- Can have the leaderboard display session, weekly, monthly, yearly, and overall times.
- Clicking on a viewer's name draws a graph displaying their watch habits over the past 10 days.
- Streamers can whitelist their viewers, effectively hiding them from normal viewing on the leaderboard.
- Search functionality allows users to look up any user, even those whitelisted.
If you want to test the server locally, you're going to need an SSL certificate
for HTTPS capabilities. I used Let's Encrypt.
The steps are as follows:
- Be sure you have the dependencies installed.
- In the Viewer-Analytics folder, create a directory called conf.
- Store your private key and certificate chain (if you're using Let's Encrypt, privkey.pem and fulllchain.pem) in Viewer-Analytics/conf.
- Change directories to Viewer-Analytics/backend.
- Use the provided config-example.json as a reference to create your own config.json file.
- Run
node backend.js