I have a dynamic IP, which doesn't work for Google Analytics IP filtering. I read this post How to excludes my visits from Google Analytics? but don't see any code for setting the variable mentioned there.
Has anyone been able to block their website visits from Google Analytics using a cookie?
This seems to work https://tools.google.com/dlpage/gaoptout. Although I don't think it was designed as I'm using it.