How Do I Turn Off Google Analytics While Using Angulartics

I'm using Google Analytics with Angulartics in my webapp. I was getting a lot of noise from my app when developing locally so I turned off Google Analytics by just not loading the script if I am running on localhost like this:

if ('localhost') < 0) { 

        /* Google Analytics Code snippet*/


but now it occurs to me that Angulartics may blow up if this script is not loaded and my analytics object does not exist. I am not seeing any errors, so it would seem that Angulartics handles this case well, but since I am not familiar with the Angulartics internals I want to be sure before I ship this piece of code.

Will this cause any issues? Have I overlooked anything?



Okay, I did some digging through the Angulartics source and it appears that they do indeed check for the existence of in all instances on the following lines:

so it would appear my initial assumption was correct and Angulartics does seem to handle cases in which Google Analytics is unavailable without blowing up.