Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Set first party client cookies from PiwikTracker.php to improve dual JS-PHP tracking and data accuracy #4239

Closed
mattab opened this Issue · 4 comments

1 participant

Matthieu Aubry
Matthieu Aubry
Owner

See Pull request proposal: #114

This pull request adds variables, functions, and logic so PiwikTracker can update client cookies and may suffice to meet the request in ticket #3239. The code was originally derived from the patch submitted (and ultimately not-accepted) in ticket #2699. Deeper research showed that the logic inside this patch was incomplete and differed greatly from piwik.js. In response, functions in Piwik.js were copied over and translated into PHP, refactoring existing code to leverage these functions.

Matthieu Aubry
Owner

In 0d5a61f: Adding first party cookie read/write to the PiwikTracker PHP client. Refs #4239
Based off the pulll request by @claytondaley and tidied up #114

Matthieu Aubry
Owner

In 0f2af69: Refs #4239 Fixing bug and adding custom variables cookie setter

TODO: we need some tests to make sure this works as expected and will not be broken in the future

  • Test new visit without a cookie: cookies 'ses' and 'id' should be created,
  • Test new page view: the 'ses' cookie should be deleted and 'id' cookie updated
  • Test new visit where the visitor has a cookie created with Piwik.JS: PiwikTracker should read the cookie as expected
Matthieu Aubry
Owner

In e285292: Load custom variables of visit scope from the cookie Refs #4239

Matthieu Aubry
Owner

In 3826fda: Enabling read/set cookies by default refs #4239

Matthieu Aubry mattab added this to the 2.0 - Piwik 2.0 milestone
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab Adding first party cookie read/write to the PiwikTracker PHP client. …
…Refs #4239

Based off the pulll request by @claytondaley  and tidied up piwik#114
0d5a61f
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab Refs #4239 Fixing bug and adding custom variables cookie setter
TODO: we need some tests to make sure this works as expected and will not be broken in the future
 *  Test new visit without a cookie: cookies 'ses' and 'id' should be created,
 *  Test new page view: the 'ses' cookie should be deleted and 'id' cookie updated
 *  Test new visit where the visitor has a cookie created with Piwik.JS: PiwikTracker should read the cookie as expected
0f2af69
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab Enabling read/set cookies by default refs #4239 3826fda
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.