Skip to content
Snippets Groups Projects
Commit 2efe5c45 authored by Markus Mächler's avatar Markus Mächler Committed by André Lahmann
Browse files

Fixes piwik limitation to track custom variables 4 and 5 together with trackSiteSearch

parent b7b63acb
No related merge requests found
......@@ -329,6 +329,13 @@ EOT;
$i = 0;
foreach ($customVars as $key => $value) {
++$i;
// Workaround to prevent overwriting of custom variables 4 and 5 by
// trackSiteSearch, see http://forum.piwik.org/read.php?2,115537,115538
if ($i === 4) {
$i = 6;
}
$value = $escape($value);
$code .= <<<EOT
_paq.push(['setCustomVariable', $i, '$key', '$value', 'page']);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment