How can I mask visitors IP addresses?

Administration

Needed permissions: owner

Piwik PRO displays a visitor IP address in various reports and uses it to show location and network data. When you want to protect an IP address of your website visitor, you can hide at four levels.

Let’s look at a few examples:

  • Full IP address: 192.168.111.255 or 1050:0000:0000:0000:0000:0000:0000:0000
  • Level 1 masked: 192.168.100.xxx or 1050:0000:0000:0000:xxxx:xxxx:xxxx:xxxx
  • Level 2 masked: 192.168.xxx.xxx or 1050:0000:0000:xxxx:xxxx:xxxx:xxxx:xxxx
  • Level 3 masked: 192.xxx.xxx.xxx or 1050:0000:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
  • Level 4 masked: xxx.xxx.xxx.xxx or 1050:00xx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx

The masking of an IP address happens after the tracker captures the address and before it sends it to the database. So when you mask IP addresses, you will never have access to the visitor’s full IP address.

IP masking in Piwik PRO

The IP address is used to read location and network data. So when the address is not full, data about the country and city will be less accurate. The more bytes you mask the less accurate location data will be.

Note: Piwik PRO can take location and network data from the full IP address just before it’s masked. In that case, the country and city will be accurate regardless of IP masking.

Before you start

Here are some things to know before you turn on IP masking:

  • You can choose to read location and network data from the full or masked IP address.
  • When you use Consent Manager, IP masking will apply to visitors who give consent. Location and network data will be captured according to the setup in the IP masking section.
  • When you use Don’t collect data from these IP addresses (Administration > Sites & apps > Data collection), added IP addresses will be excluded regardless of IP masking option. Piwik PRO will read the excluded IP address before anonymizing it.

Mask IP address

To mask the IP addresses of your visitors, follow these steps:

Available from version 16.0.0. For versions below 16.0.0, go to Menu > Administration > Platform > Global website settings > Privacy settings.

  1. Go to Menu > Administration.
  2. Navigate to Sites & apps.
  3. On the left, choose the site or app you want to work with.
  4. Navigate to Privacy.
  5. In IP addresses, turn on Mask IP address.
  6. Select the masking level.

    Note: When you use Consent Manager, IP masking will apply to visitors who give consent. Location and network data will be captured according to the setup in the IP masking section.

  7. In Collect from unmasked IP addresses choose one of the following options: All location data, City, Region, or Continent.

    Note: We’ll take this data from unmasked IP addresses before we mask them. You’ll always see masked IP addresses in reports.

    Note: You can also mask IP addresses for the whole account under Administration > Settings > Global site & app settings.

Was this article helpful?

Technical support

If you still have some questions, visit our community.
There’s always someone ready to help!

Back to help center