Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#697 closed Bug (fixed)

Campaign parameter ignored when not as first parameter

Reported by: abell Owned by:
Priority: major Milestone: Piwik 0.4.1
Component: Core Keywords: campaign
Cc: Sensitive: no


When I'm passing the campaign parameter as second parameter, it is not correctly detected.
Thus, after setting

campaign_var_name = "cm"

in config.ini.php, the following doesn't generate a campaign record:


while this one works:


Change History (9)

comment:1 Changed 5 years ago by matt (mattab)

  • Resolution set to invalid
  • Status changed from new to closed

please read: Visits from search engines or campaigns are not recorded, Piwik shows "No data available".

especially the part where it explains that only the first keyword/campaign will be recorded as referer; can you please double check that you were not testing this way?

comment:2 Changed 5 years ago by abell

Hi, there. I checked again. The visitors are all coming with URLs of the type http://my.test.domain/page?q=keyword&cm=campaignname and the visits and urls are correctly recorded (they appear in the "page" reports, including the "q" and "cm" parameters), but the campaign names are never recorded.

When I visit the URL http://my.test.domain/page?cm=testcampaign instead, the campaign is recorded and appears in the administration interface.

I still think the different behaviour depends on the campaign parameter appearing as the first one or not. Could anyone check whether this is the case?

comment:3 Changed 5 years ago by matt (mattab)

did you check with at least 30 minutes between each test? if yes we shall reopen and fix this issue

comment:4 Changed 5 years ago by abell

Hi. We did some extensive testing and we are using piwik on a production website receiving lots of daily visits of the form http://my.test.domain/page?q=keyword&cm=campaignname

Test visits where we use cm as first parameter are recorded, the ones with cm as second parameter are not. We installed the latest version yesterday and the issue seems to be still there.


comment:5 Changed 5 years ago by vipsoft (robocoder)

  • Milestone changed from 4- Stable release to 1 - Piwik 0.4.1

re-opening for investigation

comment:6 Changed 5 years ago by vipsoft (robocoder)

  • Resolution invalid deleted
  • Status changed from closed to reopened

By visual inspection of the code: piwik.js already escapes the url=XXX; in Tracker/Visit.php, getReferrerInformation() calls getRequestVar('url') which results in the value being sanitized. The result is confusing parse_url().

comment:7 Changed 5 years ago by vipsoft (robocoder)

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [1234]) fix #697 - some campaigns not being tracked

comment:8 Changed 5 years ago by koteiko

comment:9 Changed 3 years ago by matt (mattab)

  • Sensitive unset

see also

Note: See TracTickets for help on using tickets.