Advertising sustains the DA. Ads are hidden for members. Join today

Third-party Integration Modules

Advanced Google Analytics JavaScript Snippets

Last updated on
30 April 2025

Google Analytics module provides an advanced textarea on the settings page for including additional JavaScript to every page.

The official documentation about Google Analytics Tracking Code should be read first to understand how Google tracking works in general. On the Google Analytics Tracking API page you will find all available methods that can be used in this textarea. Also, you'll find JavaScript snippets dotted around in the Google Analytics Help Center.

6.x-3.x and 7.x-1.x

Don't forget to prefix all used methods in the latest (asynchronous) version with _gaq.. See Upgrading from 2.x to 3.x of Google Analytics module for the differences between the tracker customizations. Google's Asynchronous Migration Examples page has more details.

5.x-1.x and 6.x-2.x

Don't forget to prefix all used methods in the traditional (ga.js) version with pageTracker.

Add your Google Analytics advanced JavaScript snippets as comments to this page.

Help improve this page

Page status: Not set

You can: