ga or _gaq in google analytics

ga and _gaq both are global object used for tracking in google analytics.

The _gaq global object can be used directly for asynchronous page tracking via the push(…) method. It also has methods for creating tracker objects.

Example

ga use in Google universal analytics

If we use ga.js (“traditional” asynchronous code) we have to use _gaq.push. If we use analytics.js we need to use ga send. The methods are not interchangeable, they belong to two different versions of the Google Analytics tracking code.

The analytics.js snippet is part of Universal Analytics which is in latest trend. while ga.js is classical analytics.

You Might Interested In

Leave a Reply

Enclose a code block like: <pre><code>Your Code Snippet</code></pre>.