Title: Javascript Error
Last modified: August 22, 2016

---

# Javascript Error

 *  Resolved [DickRaney](https://wordpress.org/support/users/dickraney/)
 * (@dickraney)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/javascript-error-55/)
 * I’m getting a javascript error:
 * ReferenceError: _gaq is not defined
 * When I view the source, only reference to “_gaq” is in this snippet just before
   </body>
 *     ```
       <script>//<![CDATA[
       	var _gfga_gaq = _gaq;
       	function gfga_pageview(url,type) {
       		if (type == 'ua') {
       			ga('send', 'pageview', url);
       		} else {
       			_gfga_gaq.push(['_trackPageview', url]);
       		}
       	}
       //]]></script>
       ```
   
 * [https://wordpress.org/plugins/gravity-forms-google-analytics-addon/](https://wordpress.org/plugins/gravity-forms-google-analytics-addon/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [MikevHoenselaar](https://wordpress.org/support/users/mikevhoenselaar/)
 * (@mikevhoenselaar)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/javascript-error-55/#post-5169299)
 * You use Universal Analytics?
    Check the checkbox in the Gravity Forms GA settings.
   If you use get the error, you dont have a GA script in your HTML. You need that
   as well for this plugin to do his work.
 *  Thread Starter [DickRaney](https://wordpress.org/support/users/dickraney/)
 * (@dickraney)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/javascript-error-55/#post-5169301)
 * We are using Universal Analytics and have this setting checked in the GF settings:
 * > Use Universal implementation instead of ga.js implementation (_gaq)?
 * This is the GA code in the head of the HTML:
 *     ```
       <!-- Google Analytics Tracking by Google Analyticator 6.4.7.3: http://www.videousermanuals.com/google-analyticator/ -->
       <script type="text/javascript">
                       var analyticsFileTypes = ['pdf'];
                                   var analyticsSnippet = 'disabled';
                       var analyticsEventTracking = 'enabled';
                   </script>
       <script type="text/javascript">
       	(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
       	(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
       	m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
       	})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
   
       	ga('create', 'UA-51498656-1', 'auto');
   
       	ga('send', 'pageview');
   
       </script>
       ```
   
 * Then there is the Google Analytics Addon script shown above in the initial post
   which appears just before the </body> tag.
 * So why are we getting the error?
 *  Plugin Author [MikevHoenselaar](https://wordpress.org/support/users/mikevhoenselaar/)
 * (@mikevhoenselaar)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/javascript-error-55/#post-5169305)
 * I updated the plugin to 0.7.2.
    Hopefully it will fix your issue.
 *  Thread Starter [DickRaney](https://wordpress.org/support/users/dickraney/)
 * (@dickraney)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/javascript-error-55/#post-5169307)
 * That fixed it. Thanks!!
 *  Plugin Author [MikevHoenselaar](https://wordpress.org/support/users/mikevhoenselaar/)
 * (@mikevhoenselaar)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/javascript-error-55/#post-5169320)
 * Super! have fun with it!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Javascript Error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/gravity-forms-google-analytics-addon_f4b63b.
   svg)
 * [Gravity Forms: Google Analytics Addon](https://wordpress.org/plugins/gravity-forms-google-analytics-addon/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gravity-forms-google-analytics-addon/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gravity-forms-google-analytics-addon/)
 * [Active Topics](https://wordpress.org/support/plugin/gravity-forms-google-analytics-addon/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gravity-forms-google-analytics-addon/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gravity-forms-google-analytics-addon/reviews/)

## Tags

 * [javascript error](https://wordpress.org/support/topic-tag/javascript-error/)

 * 5 replies
 * 2 participants
 * Last reply from: [MikevHoenselaar](https://wordpress.org/support/users/mikevhoenselaar/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/javascript-error-55/#post-5169320)
 * Status: resolved