Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is mainly a bugfix and PHP8 compatibility release for the Google Analytics module. it is the last version that will support Drupal 8. Upgrade to Drupal 9 today!
While this 4.0.0 release is 'stable', we will wait until Jan 2022 to make it recommended so site developers can test it more widely and give time for sites to migrate from 3.x to 4.x.
Keep in mind that there are features missing in Google gtag.js API (8.x-3.x) that exists in Google analytics.js API (8.x-2.x). Therefore if you have advanced features in use you may need to stay at Google Analytics 8.x-2.x until these missing features come back.
#1836896: Outbound links not being tracked due to variable name bug
Changes in 3.4:
New features
* #1595176: Allow tokens in custom variable names
Tasks/Bugfixes:
* Code cleanup: Removed deprecated segmentation code.
* #1817562: Keep the internal URL for Google Analytics website overlay intact.
* #1801020: Track colorbox as pageview
* #1425358: Only track full-qualified links as external, block "javascript:" and maybe other
* #1113550: JavaScript: Uncaught TypeError - Cannot call method 'replace' of undefined
* #1608310: Cross-domain link tracking fails because it does not return false
* #1801046: Invalid jQuery selectors causing errors in IE8 using updated jQuery (1.7+)
* #1797988: Added some DNT tests.
* Added more forbidden tokens to the blacklist.
* Replace all type of dashes (n-dash, m-dash, minus) with the normal dashes.
* #1509610: Invalid dashes in UA–xxxxxxxx–y cannot copied & pasted from Google Analytics website
* #1804716: Setup optional modules in .test's fails
* Remove double quotes from module name
* #1793658: Update links to Google Analytics help and reference pages.
* #1783870: Custom variables can be 128 byte long now (Google API change)
* #1774238: Update link to "Setting Up Site Search for a Profile"
* #1368748 Reduced severity if UA account number not entered.
New features
* #1595176: Allow tokens in custom variable names
Tasks/Bugfixes:
* Code cleanup: Removed deprecated segmentation code.
* #1817562: Keep the internal URL for Google Analytics website overlay intact.
* #1801020: Track colorbox as pageview
* #1425358: Only track full-qualified links as external, block "javascript:" and maybe other
* #1113550: JavaScript: Uncaught TypeError - Cannot call method 'replace' of undefined
* #1608310: Cross-domain link tracking fails because it does not return false
* #1801046: Invalid jQuery selectors causing errors in IE8 using updated jQuery (1.7+)
* #1797988: Added some DNT tests.
* Added more forbidden tokens to the blacklist.
* Replace all type of dashes (n-dash, m-dash, minus) with the normal dashes.
* #1509610: Invalid dashes in UA–xxxxxxxx–y cannot copied & pasted from Google Analytics website
* #1804716: Setup optional modules in .test's fails
* Remove double quotes from module name
* #1793658: Update links to Google Analytics help and reference pages.
* #1783870: Custom variables can be 128 byte long now (Google API change)
* #1774238: Update link to "Setting Up Site Search for a Profile"
* #1368748 Reduced severity if UA account number not entered.
* Deleted obsolete googleanalytics_trackpageloadtime variable.
* Revert "#1147322: Added Site Speed report support"
New features
* #1300240: Add tracking for form error messages
* #1741514: Add support for DoubleClick remarketing tracker
* #1595176: Allow tokens in custom variable names
* #1702522: Declare variables for Variable API module and i18n module
* #1586356: Missing 'weight' support from hook_field_widget_info() makes it impossible to sanely order widgets
Tasks/Bugfixes:
* Code cleanup: Removed deprecated segmentation code.
* Support new overlay token_tree browser
* #1817562: Keep the internal URL for Google Analytics website overlay intact.
* #1801020: Track colorbox as pageview
* #1425358: Only track full-qualified links as external, block "javascript:" and maybe other
* #1113550: JavaScript: Uncaught TypeError - Cannot call method 'replace' of undefined
* #1608310: Cross-domain link tracking fails because it does not return false
* #1801046: Invalid jQuery selectors causing errors in IE8 using updated jQuery (1.7+)
* #1797988: Added some DNT tests.
* Added more forbidden tokens to the blacklist.
* Replace all type of dashes (n-dash, m-dash, minus) with the normal dashes.
* #1509610: Invalid dashes in UA–xxxxxxxx–y cannot copied & pasted from Google Analytics website
* #1804716: Setup optional modules in .test's fails
* Remove double quotes from module name
* #1793658: Update links to Google Analytics help and reference pages.
#1055980: Implemented DoNotTrack privacy feature for logged in users or if page caching is disabled.
Other issues:
Backported - What are you tracking?
Reorder fieldsets from general to specific from top down
Collapse custom variables by default
#1056786 by JacobSingh: Tests failing in 7.1.1
Added one more doc comment
Missed uninstall of variable for #1055980
#1056924: Exclude batches from tracking
Fieldset not collapsible
jquery.closest() can be used to find the closest link of a clicked region and it may be much faster. This is limited to jquery 1.3+ so we can use it only in D7.
Corrected wording
Wrong cache variable used.
Removing translation directories
Uninstall variable has wrong name
Reorder $custom_var before $codesnippet_before to allow customvar delete/read.
NOTE: If the token module is installed on your site the minimum required token version is 6.x-1.14, but for some technical reasons 6.16 or the latest DEV (mid december 2010 or later) is highly recommended.
New features:
#936684: Exclude roles from tracking
#807320: Track outgoing links as targets / Disable event tracking optionally for outgoing links.
Bugfixes and other changes:
Translations can be found on l.d.o. Use l10n_update module to install them automatically.
Do not read css_js_query_string variable if not required.
#1039394: Fix for E_ALL warning if $account->roles is empty / Prevent possible token warnings.
Typo in loose -> lose fixed.
#1038740: Followup - Added migration link for help.
NOTE: If the token module is installed on your site the minimum required token version is 6.x-1.14, but for some technical reasons 6.16 or the latest DEV (mid december 2010 or later) is highly recommended.
Major new features:
#609892 by joetsuihk, hass, bec, jmesam: Added Multiple custom variables
Fixes and changes:
Fixed broken ga.js URL if i18n language path prefix is used.
Added dummy query-string to ga.js to gain control over browser-caching.
#477830 by hass: Refactored local file caching and cache clear logic
#928360: Warning: rmdir(), check if directory exists
#477830: Followup, no need to clear JS cache as ga.js is not aggregated with core
#933204: Wrong URL (404) to module admin page at status report
Refactored _googleanalytics_cache() and hook_cron
Added purge watchdog message.
#566656: Can't segment anonymous user
#987116 by pobster: Simpletests fail in 3.x because of "Web Property ID" name change.
#990882 by gilgabar: User segmentation via 'User roles' does not require profile module.
Add token validation to form field, requires token latest DEV (mid december 2010)
NOTE: It's recommended to use the Google Analytics module v3.0. There is no reason to stay away from 3.x, except your are running Ubercart that hasn't been upgraded yet to the latest tracker API.
Always name the user setting checkbox "Enable user tracking". Not sure what I've tested there...
Changes from 2.1:
This is a maintenance release with the following changes. If you have jquery_update installed - this upgrade is a MUST HAVE to make the GA module working as expected!
Usability:
- Dynamic title and description for user opt-in/-out setting
- #329750 patch by christefano: Help text is missing command character (for users of OS X).
Always name the user setting checkbox "Enable user tracking". Not sure what I've tested there...
Changes from 2.1:
This is a maintenance release with the following changes:
Usability:
- Dynamic title and description for user opt-in/-out setting
- #329750 patch by christefano: Help text is missing command character (for users of OS X).
Features:
- #347359: AdSense reports integration with Google Analytics
- #357944: Support for try / catch (latest tracking code style)
This is a maintenance release with the following changes. If you have jquery_update installed - this upgrade is a MUST HAVE to make the GA module working as expected!
Usability:
- Dynamic title and description for user opt-in/-out setting
- #329750 patch by christefano: Help text is missing command character (for users of OS X).
Features:
- #347359: AdSense reports integration with Google Analytics
- #357944: Support for try / catch (latest tracking code style)