@anonymous-matomo-user opened this Issue on June 22nd 2012


@robocoder commented on July 26th 2012 Contributor

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 commented on July 26th 2012 Member

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 commented on July 26th 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 commented on October 1st 2013 Contributor

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 commented on October 24th 2013 Member

See #4239

This Issue was closed on October 24th 2013
Powered by GitHub Issue Mirror