2

As we know with all this new GDPR, the IP Anonymization settings are more common in our Google Analytics settings.

The question is, how to exclude IPv6 addresses by using IP Exclusion filters in Google Analytics if the IP Anonymization value is set to 'true'?

Google says:

The IP anonymisation feature in Analytics sets the last octet of IPv4 user IP addresses and the last 80 bits of IPv6 addresses to zeros in memory shortly after being sent to the Analytics Collection Network.

How much are the last 80 bits and how for example, this IPv6 will look like if the last 80bits are set to 0?

2001:db8:85a3:8d3:1319:8a2e:370:7348

The IPv6 example is from Wikipedia page.

Here is an example of IPv4 anonymisation: enter image description here Something very similar happening with IPv6. The filter in Google Analytics is applied in the Storage & Processing step, so filter must be based on anonymised IP.

  • 1
    It says "shortly after being sent". My guess is that it will exclude traffic and then it will anonymize them. – Stephen Ostermiller May 30 '18 at 9:12
  • Thanks @StephenOstermiller Please see my updated question. I added an image with the IPv4 anonymisation process as for example. You can see, that the filter is applied after IP anonymisation process in the Processing stage. – gintsg May 30 '18 at 21:17
1

After some research and tests, I figured out the answer on this.

IPv6 addresses have a size of 128 bits. An IPv6 address is represented as eight groups of four hexadecimal digits, each group representing 16 bits (two octets, a group sometimes also called a hextet[6][7]). The groups are separated by colons (:).

So, as each group represents 16 bits, it means that last 5 groups is 80bits and replaces with zeros.

This IPv6:

2001:db8:85a3:8d3:1319:8a2e:370:7348

After IP anonymization will look like this:

2001:db8:85a3::

In the end are two "::" because:

One or more consecutive groups containing zeros only may be replaced with a single empty group, using two consecutive colons (::).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.