Page MenuHomePhabricator

Store campaign and keyword data in data sets
Closed, ResolvedPublic3 Story Points


Donations as well as membership applications store the campaign/keyword value pair that is used in Piwik. The parameters come in as piwik_campaign and piwik_kwd and need to go into spenden.tracking and request.tracking when persisting the data sets. They are stored as a single string delimited by a slash.

To retain the values in every case, they should be storable on every request. They should only be stored if there is no stored value yet, though.

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 27 2016, 12:38 PM
kai.nissen triaged this task as Medium priority.Jun 27 2016, 12:40 PM
kai.nissen updated the task description. (Show Details)
kai.nissen set the point value for this task to 3.
kai.nissen moved this task from Incoming to WMDE Fundraising on the TCB-Team board.

should be storable on every request.

Do you mean requests other than add-donation and apply-for-membership?

Yes, this should happen on every request. I suggest, we use Silex's $app->before() for this.

So in that function we'd be doing an if-else-if on in_array( $route, [ /* donation routes */ ] ) and in_array( $route, [ /* membership routes */ ] )? Should add-comment be counted with the donation ones? What about the comment listing ones?

The storing of the parameters in a cookie should be done on every request, so we can use $app->before() for this, as Kai suggested. The parameters from the cookies then has to be passed to the "add donation" and "apply for membership" use cases so it can be added to the data blob.

Or better, since the tracking does not concern the use case, the additional information can be passed in when saving the donation/membership, like we do with the view/update tokens.


I've gone from understanding that the write of the data to the db should be done for every route, to only those two and back, half a dozen times by now. <o>

The values are only written to the database when storing the donation/membership application data sets. On every route incoming values have to be stored in the cookie, though. For the latter there was also a task, where did it go?

@JeroenDeDauw, this is done, right?

gabriel-wmde closed this task as Resolved.Apr 7 2017, 8:14 AM
Restricted Application added a project: WMDE-FUN-Team. · View Herald TranscriptApr 7 2017, 8:14 AM