Ticket #1198 (closed Bug: wontfix)

Opened 2 years ago

Last modified 22 months ago

using setCustomUrl() breaks campaign and newsletter tracking

Reported by: matt Owned by:
Priority: normal Milestone: Feature requests
Component: Core Keywords: wishlist
Cc: Sensitive: no

Description

When the JS method setCustomUrl() is called, the 'url' parameter to piwik.php is replaced by the custom URL. This 'url' parameter is the one parsed to detect campaign and newsletter referrals. Instead,

  • the raw, unmodified URL should be sent in 'url'
  • the custom URL (if defined via setCustomUrl()) should set a new parameter 'curl'
  • the page views tracking php logic would first try and read the curl parameter, if not available, reads the url parameter
  • the campaign / newsletter tracking php would only read the 'url' parameter

Change History

Changed 2 years ago by vipsoft

I'll have to think about this some more, but I want to record these thoughts before I leave and forget:

  • we have to keep in the mind the size of the tracking request; see #301
  • is this really necessary given that anyone using setCustomUrl() could just as easily add the campaign parameters to the custom URL?
  • is this flexible enough to handle the use case where the user has SEF URLs?
  • I dislike associating newsletter tracking with campaigns; consider the scenario where a new visitor visits your site and signs up to receive newsletters; an auto-responder sends the latest newsletter, and the new subscriber then reads the newsletter; because the campaign is only tracked on the entry page, this "read" is not tracked

Changed 2 years ago by matt

We can indeed have the known campaign parameters to the setCustomUrl() and then remove them at tracking time... These parameters are found in

  • global.ini.php: piwik_campaign, piwik_kwd,
  • soon the GA ones too see #855

I like this idea, you are right tracking request size must be kept small.

Re newsletter/campaigns; it is common in WA tools and processes to consider that a newsletter is a campaign like a PPC, off site, on site campaigns can be. The use case you're citing is pretty rare, usually newsletters are clicked more than 30min after the last visit on the website.

Changed 2 years ago by vipsoft

  • priority changed from major to normal

Changed 2 years ago by matt

  • milestone changed from 1 - Piwik 0.6 to 5 - Piwik 1.0 - Stable release

Changed 22 months ago by matt

  • keywords wishlist added
  • status changed from new to closed
  • resolution set to wontfix
  • milestone changed from 4 - Piwik 1.0 - Stable release to Features requests - after Piwik 1.0

closing as wont fix for now, as if users really want campaign tracking, they can (should?) add the parameters to the custom URL (using javascript for example).

I will also try to work on #1042 and with custom campaign variable names, this makes this task more risky.

Note: See TracTickets for help on using tickets.