That's essentially what I was doing previously, but the if (_gaq) test was throwing an unusual reference error when Disconnect was installed. I ended up finding that doing an explicit if (typeof _gaq === 'object') was safe (and then wrapped that in a try/catch for good measure).