Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
mattab opened this Issue · 5 comments

3 participants

Matthieu Aubry Anonymous Piwik user Fabian Becker
Matthieu Aubry
Owner

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: http://piwik.org/faq/how-to/#faq_155

Matthieu Aubry
Owner

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

UI:

  • 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
Anonymous Piwik user

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

refs #3299

Anonymous Piwik user

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

Show text according to browser archiving setting.

fixes #3299

Fabian Becker
Collaborator

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

Matthieu Aubry
Owner

Nice one!

Matthieu Aubry mattab added this to the 1.11 - Piwik 1.11 milestone
Fabian Becker 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.