google-analyticsanalytics.js

Am I over filtering IP Addresses in google analytics?


I am setting up Google Analytics for a client and had to filter particular IP's - I used filter type (custom) and excluded ip's with the following regex pattern:

70\.48\.245\.197| 
104\.158\.11\.79| 
209\.183\.27\.108|
766\.420 \.42\.44|

The thing is, the traffic literally dropped to zero after these filters. The only other thing I did was start working on a custom dashboard, but visitors have gone to 0 (since the first of the month).

Any thoughts/suggestions ?


Solution

  • You have an extra | character which is literally matching any input string. Also, there an empty space in the last line.

    Try using any of the online regex tester tools to validate your expression before putting it to GA

    This should work, if you have IP anonimization disabled (not enabled) 70.48.245.197|104.158.11.79|209.183.27.108|766.420.42.44