I need Google analytics for work

Hello,

I obviously don't want to be tracked whilst wandering around the Internet which is why I'm using this ace system, however work requires me to login to the Google Analytics website every now and again. You can probably work out my problem already.

Is there a way to let me visit the Google Analytics website and do the work that I need to do to get paid so that I can live indoors and eat food, but still not get tracked whilst wandering around the Internet?

Yes, I'm aware of the irony before anyone points it out that I'm trying to stop the thing I'm using. But we take baby steps, I have at least got work to analyse the first part of every IP address since I started using Pi-Hole which has salved my conscience a little!

T.I.A.

1 Like

As of now, DNS-based blocking is all or nothing, so if you whitelist Google Analytics, you are whitelisting it for every site that uses it. This is what makes Pi-hole so powerful, but can also be a catch 22 when you need to use something like Google Analytics.

A few possible solutions:

  1. Use the new enable/disable feature to turn off Pi-hole when you want to access Google Anayltics
  2. Whitelist and blacklist Google Analytics on an as needed basis
  3. Use Network Locations (if using a Mac) to switch to a non-Pi-holed network
  4. Use some lighttpd.conf config to block on a per-site basis

The last suggestion is something I have been trying to work on, but it quite difficult, so might not be feasible.

1 Like

Thanks for the quick reply!

I think I'm going to go with option 1, but for some reason I couldn't get it to work so I just temporarily changed DNS servers to Google servers and everything worked fine.

It's a good idea to use a separate Network Location, then I can just write a script using Alfred for OS X that will enable me to switch between the two really easily.

Thanks!

Yeah, I use Network Locations a lot, especially during testing I can quickly switch between my several Pi-hole's I use for testing, but it also works nice for things like this. Enjoy!

There's another option: Use another router.

I have a modem/router combo from the ISP and another router coming off of that. The second router has pihole and is what I use for personal stuff. I use the main network for work because it's faster and doesn't block things I need like Google Analytics.

1 Like