Skip to content


Visitor Generator to use API call instead of sql query - Best practise #3299

mattab opened this Issue · 5 comments

3 participants

Piwik Open Source Analytics member

Currently the Visitor Generator uses manual call to the DB, instead we should demonstrate best practise and use the recently introduced API to force old reports to be reprocessed, see:

Piwik Open Source Analytics member

Code to replace is in: /trunk/plugins/VisitorGenerator/Controller.php at L72


  • Customize message
    • If "Browser trigger archiving" is enabled then simply say "The reports will be reprocessed the next time you visit the Piwik reports, it might take a few minutes."
  • If "Browser trigger archiving" is disabled, "Please re-run the archive.php Piwik script in the crontab to refresh the reports" or similar / feel free to edit

In b613d35: Use the Piwik API instead of directly accessing the database.

refs #3299


In 011794a: Check for browser archiving in Controller.php

Show text according to browser archiving setting.

fixes #3299

Piwik Open Source Analytics member

@capedfuzz, hope you didn't invest much time in this. Needed the VisitorGenerator for Alerts so I took a few minutes to refactor it.

Piwik Open Source Analytics member

Nice one!

@mattab mattab added this to the 1.11 - Piwik 1.11 milestone
@halfdan halfdan was assigned by mattab
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.