DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Examples

Minimal configuration (asynchronous without _anonymizeIp())

config.tx_we_google_analytics.account = UA-123456-7

AnonymizeIp configuration (asynchronous)

config.tx_we_google_analytics.account = UA-123456-7
config.tx_we_google_analytics.anonymized = 1

Synchronous configuration (without _anonymizeIp()) (deprecated)

The Traditional method shouldn't be used anymore.

Misc configuration with _xxx options used

config.tx_we_google_analytics.account = UA-123456-7
config.tx_we_google_analytics._cookiePathCopy = /newSubDirectory/
config.tx_we_google_analytics._setAllowHash = true
config.tx_we_google_analytics._setCustomVar = 1, 'Section', 'Life & Style', 3

Track PageLoadTime (deprecated)

This method is deprecated because Site Speed reporting is enabled automatically by Google for all users.
“By default, a fixed 1% sampling of your site visitors make up the data pool from which the Site Speed metrics are derived. If you have a relatively small number of daily visitors to your site, such as 100,000 or fewer, you might want to adjust the sampling to a larger rate. This will provide increased granularity for page load time and other Site Speed metrics.” See Google Developers, _setSiteSpeedSampleRate() for more Information.
To define a new sample set size via:
config.tx_we_google_analytics._setSiteSpeedSampleRate = 5

Misc configuration with filetracking

Track only pdf and zip files from fileadmin folder

config.tx_we_google_analytics.account = UA-123456-7
config.tx_we_google_analytics.trackfiles = 1
config.tx_we_google_analytics.trackfiles.path = fileadmin
config.tx_we_google_analytics.trackfiles.types = pdf,zip

Misc configuration with trackexternal

config.tx_we_google_analytics.account = UA-123456-7
config.tx_we_google_analytics.trackexternal = 1
config.tx_we_google_analytics.trackexternal.types = http, https

Using the new universal tracking

config.tx_we_google_analytics.account = UA-123456-7
config.tx_we_google_analytics.type = universal

Using both - asynchronous and universal tracking (dualtag!)

config.tx_we_google_analytics.account = UA-123456-7 # Account-Number for asynchronous tracking
config.tx_we_google_analytics.type = universal
config.tx_we_google_analytics.UAdualtag = 1
config.tx_we_google_analytics.UAdualtag.account = UA-65432-1 # Account-Number universal tracking

Add Opt-Out functionality

Note

After activation, a link to the javascript function has to be set, e.g. <a href="javascript:gaOptout()">deactivate Google Analytics</a>

config.tx_we_google_analytics.optout = 1