Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP PiwikTracker class should create First-party cookies #3239

Closed
anonymous-matomo-user opened this issue Jun 22, 2012 · 5 comments
Closed

PHP PiwikTracker class should create First-party cookies #3239

anonymous-matomo-user opened this issue Jun 22, 2012 · 5 comments

Comments

@anonymous-matomo-user
Copy link

@anonymous-matomo-user anonymous-matomo-user commented Jun 22, 2012

None

@robocoder
Copy link
Contributor

@robocoder robocoder commented Jul 26, 2012

AFAIK we can only create first party cookies when:

  • using JavaScript (i.e., at the client), or
  • piwik and the site being tracked are on the same domain

Is there some other way, or am I missing something?

@mattab
Copy link
Member

@mattab mattab commented Jul 26, 2012

Correct Piwik could only set first party cookies when hosted on the same website being tracked. We could have a FAQ setting to set first party cookies in this case... but not by default since most of the time piwik is hosted on a different hostname I suppose?

@anonymous-matomo-user
Copy link
Author

@anonymous-matomo-user anonymous-matomo-user commented Jul 26, 2012

It is true that the API can't set a cookie directly for the app using it. But if the API returned such a cookie, my server-side tracking component could sent it to the browser and return it to piwik upon the next request. This simply aids the reliable detection of returning visitors by the means of the piwik tracking cookie.

Please see my project Rakwik for details: https://github.com/datenimperator/rakwik

@claytondaley
Copy link
Contributor

@claytondaley claytondaley commented Oct 1, 2013

FYI... aspects of this request were already implemented (in an interesting but ultimately not-integrated patch) in [/ticket/2699]. That particular patch was more expansive, but it may be possible to use a subset of its changes to expedite this functionality.

Incidentally, I have a shortURL processor and a WordPress installation on subdomains of the same domain. The shortURL processor must use the PHP library (no JS is loaded during a redirect) to capture key data like the referrer. Because I trust client VisitorIDs, I need to set (and read) the VisitorID from PHP in order to link that data to Page Views in WordPress.

Obviously, I have an extreme case since JS is impractical, but there are other cases (including the case motivating the patch mentioned above, [http://forum.piwik.org/read.php?2,81615,82036]) where a combination of PHP and JS is desirable despite domain limitations mentioned in earlier responses.

@mattab
Copy link
Member

@mattab mattab commented Oct 24, 2013

See #4239

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants