Search code examples
development-environmentgoogle-analytics

Is there a way to stop Google Analytics counting development work as hits?


I have added the JavaScript that I need to the bottom of my pages so that I can make use of Google Analytics. Only problem is that I am sure that it is counting all my development work as hits. Seeing as I probably see some of those pages a hundred times a day it will really skew my readings. Is there a way to turn it off from a particular IP address or is this something that should be built into my build process so it only gets added when I build for deployment?


Solution

  • Yeah, you go into Analytics Settings, edit your site, and +Add Filter to define a filter that excludes your IP address.

    Past data is not regenerated with filters applied, so you'll only have the benefit of them moving forward.