Check website stats with and without excluded IPs


#1

Hi everyone,

I have a following issue. I want to count statistics for one website but in two ways: with and without excluded IPs. The purpose is to compare traffic made by whole company to overall traffic. I’ve added two websites to Piwik referring to the same website. First is without any excluded IPs and the other one has several excluded IPs. Then I’ve modified default tracking code by putting the line _paq.push([“setSiteId”, “2”]); right after _paq.push([“setSiteId”, “1”]);
This doesn’t work obviously :slight_smile: Now stats are counting only for the “excluded IPs” website.
The question is: what did i do wrong? How can I setup my piwik to show traffic stats of one website with and without excluded IPs?

My version of Piwik is 1.12


#2

I use Segment Editor in 1.12 to do this. Read: Segmentation - Compare segments of visitors - Analytics Platform - Matomo

Segment name : Exclude my co-workers
Visitor IP is not x.x.x.x
OR
Visitor IP is not x.x.x.x

And you can do the opposite so at the end you have the default segment(everyone), Internals and Public. And a single site ID.

Be aware that you can’t use wildcards like 132.203.11.*

Dali


(Matthieu Aubry) #3

To track data in two websites, you can’t use the asynchronous script. I know it’s not really clearly documented, but this is by design. See: JavaScript Tracking Client: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3


#4

Thank You guys for your answers.

I’ve updated my piwik to version 2.0.3 and used segmentation method mentioned by dali
I had issues with excluding IP range but fortunately 2.0.3 comes with new filters.
Now I can exclude IPs using following filters: equals, not equals, at most, at least, greater than, less than.

It’s very useful.

Thank You once more.