From a93f6f31b59534ed42637702b5dcfe9095eccd8b Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Fri, 1 Feb 2019 10:55:34 +1300 Subject: [PATCH] Add possibility to disable the queued tracking handler --- CHANGELOG.md | 6 ++++++ QueuedTracking.php | 6 ++++++ docs/faq.md | 1 + plugin.json | 2 +- 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e81075..0784a56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/QueuedTracking.php b/QueuedTracking.php index 925d729..d1867a8 100644 --- a/QueuedTracking.php +++ b/QueuedTracking.php @@ -8,6 +8,7 @@ */ namespace Piwik\Plugins\QueuedTracking; +use Piwik\Common; use Piwik\Plugins\QueuedTracking\Queue\Backend\MySQL; use Piwik\Plugins\QueuedTracking\Tracker\Handler; @@ -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()) { diff --git a/docs/faq.md b/docs/faq.md index 87b222d..fb4d89f 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -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?__ diff --git a/plugin.json b/plugin.json index 5b9c95c..69a6cef 100644 --- a/plugin.json +++ b/plugin.json @@ -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"],