Upper and lower case version of campaigns


#1

Within the Goals tab, one can select Campaigns to follow conversions. Unfortunately, there seems to be a bug splitting some compaigns into a upper and lower case version of both the campaign and the keyword string.

This is the URL hash part: [size=small]module=Goals&action=goalReport&idSite=1&period=range&date=previous7&idGoal=3[/size]; I have attached a picture of one example but it really happens in a much wider spread.

The lower case version gets the visits and the upper case the conversions, leading to a false report of 0% rates everywhere.

I am 100% certain that the incoming links only use the version containing upper case letters!

Is this a known bug? It looks like a side effect of Make campaign name and campaign keyword lowercase when tracking · Issue #4260 · matomo-org/matomo · GitHub. How can I help the community to prevent this? I am willing to upload a database dump.

I’m running Piwik version 2.1-RC1 (possibly updated while the campaign was active).


#2

Solved as follows (please comment if there is a better way or that it causes problems down the road):
[ol]
[li] Applied the patch from https://github.com/piwik/piwik/commit/4c5f26b8e5ff5a2c38212d5aa9cc1fcb1ea87206#diff-b02e7b361f37b6082c3cf79936053be1R869, which comes from the bug tracker linked in my post above
[/li][li] Ran the following SQL: UPDATE piwik_log_conversion SET referer_name=LOWER(referer_name), referer_keyword=LOWER(referer_keyword) WHERE referer_type=6
[/li][li] And this SQL: UPDATE piwik_log_visit SET referer_name=LOWER(referer_name), referer_keyword=LOWER(referer_keyword) WHERE referer_type=6
[/li][li] emptied Piwik’s tmp directory
[/li][li] deleted the 2 archive tables for this month from the database
[/li][li] re-ran cron (needed some --force)
[/li][li] cleared browser cache and voilà!
[/li][/ol]

Each campaign and keyword is now listed just once, as it should.