Install
Works with Drupal: 7.xUsing Composer to manage Drupal site dependencies
Downloads
Release notes
NOTE: After update, visit the module settings page and save to update settings.
NOTE: If your site is not using PHP 5.4+, then please use the first commit after the 7.x-1.1 release (as the 1.1 release has a couple of instances of 5.4 syntax).
Change position of 'script' snippet to head region of page response.
- This matches current recommendation from Google.
Add the snippets to the page response in hook_page_build().
- By implementing hook_page_alter(), a contributed module can easily:
-- Alter the position and contents of each snippet.
-- Insert a snippet ahead of the script and data layers snippets.
Add setting to include snippets in page response as JS files instead of inline.
- This is the default option.
Add settings for data layer name, and whitelist and blacklist classes.
Add two alter hooks: insertion conditions and snippets.
- With the first, contributed modules can apply additional context to the insertion conditions.
- With the second, they can alter the snippets (e.g. add custom variables).
Add support for variable module.
- This in turn makes available i18n support.
Make the export of settings portable across sites.
- Use role name instead of role id.
Revise response status condition to be similar to other conditions.
- All conditions now follow the 'all except' or 'only' pattern.
- All conditions must be satisfied for the snippets to be inserted.
Issues reflected in the above changes include:
#2820017: Change position of script snippet: Change position of 'script' snippet in page response.
#2467901: Export role names in features instead of rids: Replace role IDs with role names.
#2451295: Add setting for the data layer name: Add data layer setting.
#2308667: DataLayer support?: Add settings for whitelist and blacklist classes.
#2342557: Add variable support: Add support for variable module.