Opened 21 months ago

Closed 15 months ago

Last modified 15 months ago

#3299 closed Bug (fixed)

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

Reported by: matt Owned by: halfdan
Priority: normal Milestone: 1.11 - Piwik 1.11
Component: Core Keywords:
Cc: Sensitive: no

Description (last modified by matt)

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:

Change History (7)

comment:1 Changed 21 months ago by matt (mattab)

  • Description modified (diff)

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

comment:2 Changed 21 months ago by matt (mattab)

  • Description modified (diff)
  • Owner set to capedfuzz

comment:3 Changed 15 months ago by halfdan

  • Owner changed from capedfuzz to halfdan
  • Status changed from new to assigned

comment:4 Changed 15 months ago by Fabian Becker

In b613d35e35360f62c0e2098c3c9ccfe470a06904:

Use the Piwik API instead of directly accessing the database.

refs #3299

comment:5 Changed 15 months ago by Fabian Becker

  • Resolution set to fixed
  • Status changed from assigned to closed

In 011794a78722bd99762ca12c4c11371033a310bc:

Check for browser archiving in Controller.php

Show text according to browser archiving setting.

fixes #3299

comment:6 Changed 15 months ago by halfdan

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

comment:7 Changed 15 months ago by matt (mattab)

Nice one!

Note: See TracTickets for help on using tickets.