electerious / Ackee

Self-hosted, Node.js based analytics tool for those who care about privacy.

Home Page:https://ackee.electerious.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Migrating and updating Ackee screwed up unique visitor count

CookedApps opened this issue Β· comments

🐞 Describe the bug

Unique visitor count exploded after migrating to another server and switching from Ackee version 3.1.0 to 3.3.0.
I moved my Ackee instance to another server and bumped up the version of Ackee and MongoDB. I restored the database using mongorestore, which worked like a charm. Everything worked just fine on the new server. I also changed the subdomain under which Ackee runs. We use use-ackee 3.0.0 in the frontend and I adjusted the URL there.

See screenshot below: You can clearly see the bump in unique visitors. I am 100% sure this is incorrect. This completely fucked up our statistics. Is there any way to recover the truth?

πŸ“š To Reproduce

  • Use docker-compose for deployment
  • Migrate the entire MongoDB via mongodump and restore it with mongorestore
  • Fire up the new deployment with the restored database
  • See what happens

πŸ’‘ Expected behavior

  • Unique visitors are counted corretly

πŸ–ΌοΈ Screenshots

Bildschirmfoto 2021-12-26 um 10 59 03

βš™οΈ Environment

  • Installation: Docker-Compose
  • Ackee version: 3.3.0
  • MongoDB: 5.0
  • use-ackee: 3.0.0

This might be related to #304

Does this only affect existing statistics in the history or also new visits?

@electerious
It only affects new visits. The statistics prior to the peak you see in my screenshot are correct, and the peak is incorrect (seemingly non-unique visitors).

I switched back to version 3.1.1 which fixed new visits, but the peak still remains.
Haven't tested it with version 3.2.0 but 3.3.0 is definitely broken.

I need a fix which corrects this peak. Otherwise, my total statistics will be useless forever.

There shouldn't be any changes related to the unique visitor count in 3.2.0 and 3.3.0. I'm not sure why this happened. Restarting the server will create a new salt and all upcoming visitors will be tracked as unique. But this should only affect the current day (the day of the restart). Your peak is way too high to say that it's just because of the new salt.

I'm closing this issue, because there's currently nothing I can do. Fixing #304 could help and make this less likely to happen.

I need a fix which corrects this peak. Otherwise, my total statistics will be useless forever.

The only way to do so is to delete all records in the database of that day.