I’ve got google analytics setup on a rails project, and I’ve got “A single domain (default)” selected for the tracking options.
I’ve copied and pasted the js code into the layout for the application.
Now, if I use this locally, does analytics track the local use as well?
The reason I’m asking this is we’ve been running tests on our dev computers using rspec, and there seems to be a spike in the analytics. All these spikes also seem to show up as unique visitors.
I’d appreciate any insight on this.
Thanks!
Yes, it does track local visits as well.
You should probably use ruby conditional statement to exclude it for the local conneciton.
For example, at the bottom of the layout file
This way, Google Analytics will not be printed if connection is made from local.