Filter own ip


(Innocentus) #1

I want to filter out my own ip address from the piwik statistics.
The best thing could be if the ip address is determined on the client-side and sent to a piwik plugin which then filters out all entries with this ip address.
Is there already a plugin for that or another solution?

Thank you for your answers in advance!
With best regards
Inno


(vipsoft) #2

We originally planned to include this feature in 0.5.5, but now plan to implement this for 0.5.6 to (hopefully) be released near the end of this month/beginning of next.


(Innocentus) #3

Yes, that would be great!
Do you know if one will be also able to add multiple ip addresses to be filtered out or will be only one single ip address possible?

With best regards
Inno


(vipsoft) #4

plan is to allow multiple; global across all sites and also site-specific


(vreesh) #5

hi, it’s 1 month ago, whats about 0.5.6? style_emoticons/<#EMO_DIR#>/smile.gif


(vipsoft) #6

Aiming for the end of April to release 0.6.


(Eukaryota) #7

Hi,

filtering an IP address works fine in the 0.6RC1.
Pls. consider using PHP variable _ENV[“REMOTE_ADDR”] as an filter option, too.
My ISP forces me to reconnect every 24 hours so that I get a new IP address every day…

Kind regards from Germany
Michael


(juti) #8

yea, would be a nice feature. I hope it comes soon.


(Eukaryota) #9

Hi,

based upon the existing IP filtering mechanism (in 0.6 RC1) here’s a workaround for filtering the own IP address by default:

  1. open piwik directory plugins/SitesManager
  2. open sitesmanager.php for editing
  3. look for private function getTrackerExcludedIps($idSite)
  4. insert $ownIP = $_SERVER['REMOTE_ADDR']; after $globalExcludedIps = Piwik_SitesManager_API::getInstance()->getExcludedIpsGlobal();
  5. insert $excludedIps .= ',' . $ownIP; [b]after[/b] $excludedIps .= ',' . $globalExcludedIps;
  6. save sitesmanager.php to the server
This should filter your IP by default... seems to work for me.

It’s a quickhack and I’m not a PHP expert, so maybe someone makes it an option within the sites manager view.

Edit: Grrr… works not as expected. Forced my ISP to change my IP. And Piwik is counting again. But this hopefully may be the correct approach.

Kind regards
Michael