Skip to content

Commit

Permalink
Merge pull request #96 from matomo-org/disablehandlerfeature
Browse files Browse the repository at this point in the history
Add possibility to disable the queued tracking handler
  • Loading branch information
tsteur authored Jan 31, 2019
2 parents 8b21858 + a93f6f3 commit ee02d3f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## Changelog

3.3.3
- Add possibility to ignore queued tracking handler and track request directly into the database

3.3.2
- Send branded HTML email

3.3.1
- Support MySQLi adapter

Expand Down
6 changes: 6 additions & 0 deletions QueuedTracking.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/
namespace Piwik\Plugins\QueuedTracking;

use Piwik\Common;
use Piwik\Plugins\QueuedTracking\Queue\Backend\MySQL;
use Piwik\Plugins\QueuedTracking\Tracker\Handler;

Expand Down Expand Up @@ -48,6 +49,11 @@ public function isTrackerPlugin()

public function replaceHandlerIfQueueIsEnabled(&$handler)
{
$useQueuedTracking = Common::getRequestVar('queuedtracking', 1, 'int');
if (!$useQueuedTracking) {
return;
}

$settings = Queue\Factory::getSettings();

if ($settings->queueEnabled->getValue()) {
Expand Down
1 change: 1 addition & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ __How can I debug in case something goes wrong?__
* Set the option `-vvv` when processing via `./console queuedtracking:process -vvv` to enable the tracker debug mode for this run. This will print detailed information to screen.
* Enable tracker mode in `config.ini.php` via `[Tracker] debug=1` if processing requests during tracking is enabled.
* Use the command `./console queuedtracking:print-queued-requests` to view the next requests to process in each queue. If you execute this command twice within 1-10 minutes, and it outputs the same, the queue is not being processed most likely indicating a problem.
* You can add the tracking parameter `&queuedtracking=0` to the tracking request to insert a tracking request directly into the database instead of into the queued tracking handler

__I am using the Log Importer in combination with Queued Tracking, is there something to consider?__

Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "QueuedTracking",
"version": "3.3.2",
"version": "3.3.3",
"description": "Scale your large traffic Piwik service by queuing tracking requests in Redis for better performance. ",
"theme": false,
"keywords": ["tracker", "tracking", "queue", "redis"],
Expand Down

0 comments on commit ee02d3f

Please sign in to comment.