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 devel
The solution is to use Google Tag Manager (GTM) to handle your Google Analytics. This will allow you to only fire Google Analytics on your production domain without having to write any conditionals in your site's code. Here's how to do it:
In GTM, set a Trigger that only fires when the Page Hostname contains your production domain.
Then set a Tag for Universal Analytics and make its Trigger the one you just created.