When trying to detect if we have a campaign keyword, the code calls
Piwik_Common::getParameterFromQueryString($this->currentUrlParse['query'], $campaignKeywordVariableName);
the $urlQuery is: ariba_campaign=Adwords-CPC&ariba_kwd=My killer keyword
and the $parameter is ariba_kwd
Note that the & was inserted when calling parse_url
The comment of the function Piwik_Common::getParameterFromQueryString:
* <a class='mention' href='https://github.com/param'>@param</a> string $urlQuery result of parse_url()['query'] and htmlentitied (& is &) eg. module=test&action=toto or ?page=test
and it does appear that since the "&" is now & it has been htmlspecialchar'ed.
However since the split happens on &, we get &ariba_kwd=My killer keyword and do not match ariba_kwd
Note that this comment indicates that this data is expected in this format:
/**
* Returns the value of a GET parameter $parameter in an URL query $urlQuery
*
* <a class='mention' href='https://github.com/param'>@param</a> string $urlQuery result of parse_url()['query'] and htmlentitied (& is &) eg. module=test&action=toto or ?page=test
* <a class='mention' href='https://github.com/param'>@param</a> string $param
*
* <a class='mention' href='https://github.com/return'>@return</a> string|bool Parameter value if found (can be the empty string!), false if not found
*/
static public function getParameterFromQueryString( $urlQuery, $parameter)
I might try to fix this in my local copy, but I'm new enough to Piwik to be leery of anything more at the moment.
dupe #697; fixed in svn