Ensuring Google Analytics is Running Properly

Estimated Reading Time: 3 minutes
June 25, 2012

Once you’ve pasted the necessary JavaScript code into the pages you wish to track with Google Analytics, there are a handful of ways to make sure Google Analytics is set up and running properly. You can confirm this fact by checking for JavaScript errors in a browser’s console and using Google Analytics’ Real-Time function.

Checking for errors in Google Chrome:  First you’ll want to install the Ghostery extension.  When Google Analytics is running, Ghostery will display “Google Analytics” in a small pop-up window, like in the screenshot below:

Ghostery running in Google Chrome

Chrome’s Ghostery Extension in action

Once you’re sure Google Analytics is running you’ll want to make sure it’s running properly by checking for JavaScript errors.  One option is to right click anywhere on the webpage and select ‘Inspect Element.’  In the new frame that shows up, click the tab named ‘Console’ on the far right.  Another way is to go into the Chrome wrench menu and select ‘Tools>JavaScript console.’  The shortcut for this action is f12.  The console will look like this:

_gaq is not defined Google Analytics error

_gaq is not defined Google Analytics error

In the console you’re looking for the two common JavaScript errors:

    • _gaq is not defined (see screenshot above)
    • pageTracker is not defined
If you see one or more of these errors on any of your website’s pages you should contact your web developer immediately, as you might be missing out on valuable analytics information and/or receiving incorrect information about your website’s traffic from Google Analytics.

JavaScript Errors in Firefox:  It’s also a good idea to check for JavaScript errors on more than one browser to cover your bases.  In Firefox, first you’ll need to install the Ghostery and Firebug extensions.  To do this simply go to the Firefox menu, select “Add-ons,” then search for each Extension.  Once installed, the Ghostery and Firebug logos will appear in the Navigation toolbar.  Like with Chrome, when the page loads Ghostery will tell you if Google Analytics is running, and by clicking the Firebug logo or hitting f12 you can turn the Console on and off.  Once in the Console, like with Chrome, you’ll want to go through a handful of pages looking for the specific Google Analytics-related JavaScript errors: _gaq is not defined and pageTracker is not defined.

Real-Time Google Analytics:  Finally, if you want to confirm your Google Analytics is set up and working properly, use Google Analytics’ Real-Time function.  For an in-depth look at Real-Time Google Analytics check out 8 Reasons Why Google Analytics Real-Time is so Awesome.  In the GA dashboard, click the Home tab [1] at the top and select “Real-Time” on the left-hand side [2].  Test that Google Analytics is working properly by going to different pages in one window and ensuring “Active Pages” [3] in Real-Time is changing with you.  A screenshot of these three features is below:

Google Analytics Real-Time Dashboard

Google Analytics Real-Time Dashboard

If you have any questions or would like to learn more about this topic please contact info@infotrustllc.com.

Article written by James Love

Author

  • Jimmy Love is currently the Industry Team Manager for the Healthcare & Fitness Industry Team at InfoTrust. Jimmy was a contributor to InfoTrust’s Crawl, Walk, Run Amazon best-selling book series, and a speaker at the New York City Durability Summit. Jimmy works with some of the largest healthcare and fitness organizations in the world, helping them advance their digital analytics maturity in a forward-thinking and strategic manner.

    When away from his desk, Jimmy enjoys attending Cincinnati Bearcats football and basketball games, and spending quality time with his beautiful wife and dogs.

    View all posts
Last Updated: May 31, 2023

Get Your Assessment

Thank you! We will be in touch with your results soon.
{{ field.placeholder }}
{{ option.name }}

Talk To Us

Talk To Us

Receive Book Updates

Fill out this form to receive email announcements about Crawl, Walk, Run: Advancing Analytics Maturity with Google Marketing Platform. This includes pre-sale dates, official publishing dates, and more.

Search InfoTrust

Leave Us A Review

Leave a review and let us know how we’re doing. Only actual clients, please.

  • This field is for validation purposes and should be left unchanged.