Principles

Extended Google Analytics measuremet.

GA script is follows by several principles.

Removing duplicate code

If you need to measure multiple profiles GA, it means code duplication. All commands must be set for each account separately. When you delete or add new account, the most of the existing code must be duplicated, which can be challenging.

GA script requires the name of each tracker when it is created using the create method. If the method names are passed without trackers name (e.g. _trackEvent and not t1._trackEvent), parameters are passed to all created trackers. If the method is called and with the name of the tracker (e. g. t1._trackEvent) they are passed only to one specific tracker.

When you use GA script and want to duplicate all measurement in another account, you need to add just one line that creates tracker - call methods create.

Measuring code in one place

Virtual pageviews, events linked to the various buttons etc., cause splitting code into the pieces placed on different locations of the web sites. Thanks the use of jQuery library and by replacing a virtual pageviews with routes you can easily maintain the configuration neatly in one place.

The similarity with the default tracking code

Passing values ​​by the method _gas.push is exactly the same as the standard _gaq.push method. Calling over _gas and _gaq can be combined. The entire library is designed to be as similar as possible to standard tracking code.