Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Bad request caused by a large number of cookies created by Piwik #2453

Closed
anonymous-piwik-user opened this Issue · 3 comments

3 participants

@anonymous-piwik-user

Every time a visitor visits a new page that has Piwik tracking installed a new cookie is created. If the number of such pages per day (before cookies start to expire) comes to a certain limit the visitor starts getting Bad Request page because the header length of the HTTP request becomes too big.

For example we use Piwik to track visitors interactive RE tours (http://seetheproperty.com/1100). Each tour is considered as a separate website. We have thousands of them.
So as an end buyer browses through different tours in the search for a suitable home header length is being increased until the end buyer starts getting Bad Request error.

Keywords: cookie, bad request

@anonymous-piwik-user

Attachment: screen shot showing Piwik cookies in Chrome
639634.xml

@robocoder
Collaborator

This isn't a supportable use case because your path ('/1100') is actually a redirect.

The "Bad Request" occurs because each site has its own set of cookies. In normal circumstances, the solution would be to partition the sites by path and use setCookiePath('/1100'). If you're using mod_rewrite, it might be as simple as rewriting the URLs without the
[R]
flag.

Alternately, there's a plugin in #2371 that can track a site by URL. You would use a single site ID on the client (i.e., a single set of cookies), but on the server, log to separate sites based on the domain in the URL. Feel free to customize it to use the URL path (or a parameter in the query, e.g., order_id). There are some caveats though (described in the ticket).

@anonymous-piwik-user anonymous-piwik-user added this to the 1.5 - Piwik 1.5 milestone
@mattab mattab added the R: worksforme label
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.