On 16 September 2013 11:03, Chris Green cl@isbd.net wrote:
Is it possible to provide a 'do nothing' web page so that one can set references to google.analytics.com for example to go to a page on localhost that does nothing?
[..]
If I just put an entry like 127.0.0.1 google.analytics.com
That would be the first step regardless, so I would start there.
Then, assuming you have Apache (or similar) running you'd want it configured so that http[s]://localhost/ga.js returned an empty file; as far as I can tell that's all you'd need. But do note that you'd need https to work as well to do it properly.
I'd be surprised if collecting the file itself is causing a delay (nearly everyone uses it, so it'll be cached by the browser anyway); any delay will come from the code in that file "doing its thing". I have noticed apparent delays there myself too, although never bad enough to do something about it. Since the GA code should (I assume) run asynchronously it still shouldn't be having the impact it seems to, which has always made me suspect something else is the issue. I'd have thought that just the hosts file entry would be enough to prove it one way or another though.
Mark