Uncaught ReferenceError: _gaq is not defined (Google Analytics)

Every now and then the following message appears when viewing a site page in the chrome debug log.

"Uncaught ReferenceError: _gaq is not defined"


It took me a little while to realize it is the Google Analytics code. To get rid of this issue let alone not let your other scripts bug out when using reference pointers; add the following to your snippet just before the first variable request:

++ var _gaq = _gaq || [];
Author: Angelique Dawnbringer Published: 2016-02-18 22:09:55 Keywords:
  • Google
  • Google Analytics
  • Error
Modified: 2017-07-24 12:17:26