Opened 21 months ago

Closed 21 months ago

Last modified 21 months ago

#3285 closed Bug (fixed)

Ignore Web browsers "Preview" http request

Reported by: matt Owned by:
Priority: normal Milestone: 1.8.3 - Piwik 1.8.3
Component: Core Keywords:
Cc: Sensitive: no

Description (last modified by matt)

Reported in forum

Proposal from Anthon:
We just need to exclude visits with the X-Moz: prefetch (Mozilla), X-Purpose: preview (Safari, Opera), and X-Purpose: instant (Chrome)

something like

$_SERVER["HTTP_X_PURPOSE"] == "preview" || $_SERVER['HTTP_X_MOZ'] == "prefetech")

Change History (5)

comment:1 Changed 21 months ago by matt (mattab)

  • Description modified (diff)

comment:2 Changed 21 months ago by vipsoft (robocoder)

I would have added a UA check as an additional guard against header spoofing.

Also, what about "X-Purpose: instant"?

p.s. is the commit hook not working?

comment:3 Changed 21 months ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from new to closed

Did you see any doc on X-purpose: instant?

Header spoofing: that's fine with me if users spoof this header to exclude themselves from tracking? :)

comment:5 Changed 21 months ago by vipsoft (robocoder)

https://developers.google.com/search?q=%22x-purpose%22

For Chrome, it was "preview" at one point, and then later changed to "instant". Oh, and at one point, it seems there was also a bug (now fixed) where Chrome sent: "X-Purpose: : instant" (extra colon and space).

Note: See TracTickets for help on using tickets.