Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fail extracting campaign keyword #822

Closed
anonymous-matomo-user opened this issue Jun 22, 2009 · 1 comment
Closed

fail extracting campaign keyword #822

anonymous-matomo-user opened this issue Jun 22, 2009 · 1 comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. duplicate For issues that already existed in our issue tracker and were reported previously. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.

Comments

@anonymous-matomo-user
Copy link

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 &amp was inserted when calling parse_url

The comment of the function Piwik_Common::getParameterFromQueryString:

 * @param 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
 *
 * @param string $urlQuery result of parse_url()['query'] and htmlentitied (& is &) eg. module=test&action=toto or ?page=test
 * @param string $param
 *
 * @return 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.

@robocoder
Copy link
Contributor

dupe #697; fixed in svn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. duplicate For issues that already existed in our issue tracker and were reported previously. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

4 participants