You are here

README.txt in GoogleTagManager 7.2

Same filename and directory in other branches
  1. 7 README.txt
CONTENTS OF THIS FILE
---------------------

 * Introduction
 * Requirements
 * Installation
 * Configuration
 * Troubleshooting
 * Maintainers


INTRODUCTION
------------

This project integrates the site with the Google Tag Manager (GTM) application.
GTM allows you to deploy analytics and measurement tag configurations from a
web-based user interface (hosted by Google) instead of requiring administrative
access to your website.

 * For a full description, visit the project page:
   https://www.drupal.org/project/google_tag

 * To submit bug reports and feature suggestions, or to track changes:
   https://www.drupal.org/project/issues/google_tag


REQUIREMENTS
------------

Sign up for GTM and obtain a 'container ID' for your website. Enter the
'container ID' on the settings form for this module (see Configuration).

 * https://tagmanager.google.com/


INSTALLATION
------------

Place the project files in an appropriate modules directory and enable the
module as you would any other contributed module. For further information see:

 * https://www.drupal.org/node/895232


CONFIGURATION
-------------

Users in roles with the 'Administer Google Tag Manager' permission will be able
to manage the module settings and containers for the site. Configure permissions
as usual at:

 * Administration » People » Permissions
 * admin/people/permissions

From the module settings page, configure the snippet URI and the default
conditions on which the tags are inserted on a page response. Conditions exist
for: page paths, user roles, response statuses, and variable realms. See:

 * Administration » Configuration » System » Google Tag Manager
 * admin/config/system/google_tag/settings

From the container management page, manage the containers to be inserted on a
page response. Add one or more containers with separate container IDs and the
snippet insertion conditions. See:

 * Administration » Configuration » System » Google Tag Manager
 * admin/config/system/google_tag

The module does NOT implement the Variable API, but does include a realm setting
so that containers may be separately configured by realm, thus enabling support
for multiple languages and domains. If these features are needed, then review
the other projects at:

 * https://www.drupal.org/project/variable
 * https://www.drupal.org/project/18n
 * https://www.drupal.org/project/domain_variable

For development purposes, create a GTM environment for your website and enter
the 'environment ID' on the 'Advanced' tab of the settings form.

 * https://tagmanager.google.com/#/admin

For additional data layer management, consider the dataLayer module. It supports
the default name for the data layer. To use a non-default name, apply a patch to
the code from that module module.

 * https://www.drupal.org/project/dataLayer


TROUBLESHOOTING
---------------

If the JavaScript snippets are not present in the HTML output, try the following
steps to debug the situation:

 * Confirm the snippet files exist at the snippet base URI shown on the module
   settings page. By default this is public://google_tag/ which on most sites
   equates to sites/default/files/google_tag/.

   If missing or stale, then invoke a cache rebuild (see note below) or visit
   the container management page, edit each container, and submit the form to
   recreate the snippet files for the container.

   The need to do this may arise if the project is deployed from one environment
   to another (e.g. development to production) but the snippet files are not
   deployed.

   NOTE: Snippet files will only be recreated on cache rebuild if the 'Recreate
   snippets on cache rebuild' setting is enabled (this is the default). A cache
   rebuild can be triggered from the command line using drush or from the site
   performance administration page.

 * Enable debug output on the module settings page to display the result of each
   snippet insertion condition in the message area. Modify the insertion
   conditions as needed.

If you retain the default module setting to 'Include the snippet as a file',
then the Google Search Console will report that the site is NOT setup to use the
Tag Manager. This report is a FALSE POSITIVE as the bot only checks for inline
code on the script tag. It does not load the snippet file and inspect the code
therein. Instead of relying on this bot, check whether the GTM snippets are
loaded as a result of the snippet added by this project.


MAINTAINERS
-----------

Current maintainer:

 * Jim Berry (https://www.drupal.org/u/solotandem)

File

README.txt
View source
  1. CONTENTS OF THIS FILE
  2. ---------------------
  3. * Introduction
  4. * Requirements
  5. * Installation
  6. * Configuration
  7. * Troubleshooting
  8. * Maintainers
  9. INTRODUCTION
  10. ------------
  11. This project integrates the site with the Google Tag Manager (GTM) application.
  12. GTM allows you to deploy analytics and measurement tag configurations from a
  13. web-based user interface (hosted by Google) instead of requiring administrative
  14. access to your website.
  15. * For a full description, visit the project page:
  16. https://www.drupal.org/project/google_tag
  17. * To submit bug reports and feature suggestions, or to track changes:
  18. https://www.drupal.org/project/issues/google_tag
  19. REQUIREMENTS
  20. ------------
  21. Sign up for GTM and obtain a 'container ID' for your website. Enter the
  22. 'container ID' on the settings form for this module (see Configuration).
  23. * https://tagmanager.google.com/
  24. INSTALLATION
  25. ------------
  26. Place the project files in an appropriate modules directory and enable the
  27. module as you would any other contributed module. For further information see:
  28. * https://www.drupal.org/node/895232
  29. CONFIGURATION
  30. -------------
  31. Users in roles with the 'Administer Google Tag Manager' permission will be able
  32. to manage the module settings and containers for the site. Configure permissions
  33. as usual at:
  34. * Administration » People » Permissions
  35. * admin/people/permissions
  36. From the module settings page, configure the snippet URI and the default
  37. conditions on which the tags are inserted on a page response. Conditions exist
  38. for: page paths, user roles, response statuses, and variable realms. See:
  39. * Administration » Configuration » System » Google Tag Manager
  40. * admin/config/system/google_tag/settings
  41. From the container management page, manage the containers to be inserted on a
  42. page response. Add one or more containers with separate container IDs and the
  43. snippet insertion conditions. See:
  44. * Administration » Configuration » System » Google Tag Manager
  45. * admin/config/system/google_tag
  46. The module does NOT implement the Variable API, but does include a realm setting
  47. so that containers may be separately configured by realm, thus enabling support
  48. for multiple languages and domains. If these features are needed, then review
  49. the other projects at:
  50. * https://www.drupal.org/project/variable
  51. * https://www.drupal.org/project/18n
  52. * https://www.drupal.org/project/domain_variable
  53. For development purposes, create a GTM environment for your website and enter
  54. the 'environment ID' on the 'Advanced' tab of the settings form.
  55. * https://tagmanager.google.com/#/admin
  56. For additional data layer management, consider the dataLayer module. It supports
  57. the default name for the data layer. To use a non-default name, apply a patch to
  58. the code from that module module.
  59. * https://www.drupal.org/project/dataLayer
  60. TROUBLESHOOTING
  61. ---------------
  62. If the JavaScript snippets are not present in the HTML output, try the following
  63. steps to debug the situation:
  64. * Confirm the snippet files exist at the snippet base URI shown on the module
  65. settings page. By default this is public://google_tag/ which on most sites
  66. equates to sites/default/files/google_tag/.
  67. If missing or stale, then invoke a cache rebuild (see note below) or visit
  68. the container management page, edit each container, and submit the form to
  69. recreate the snippet files for the container.
  70. The need to do this may arise if the project is deployed from one environment
  71. to another (e.g. development to production) but the snippet files are not
  72. deployed.
  73. NOTE: Snippet files will only be recreated on cache rebuild if the 'Recreate
  74. snippets on cache rebuild' setting is enabled (this is the default). A cache
  75. rebuild can be triggered from the command line using drush or from the site
  76. performance administration page.
  77. * Enable debug output on the module settings page to display the result of each
  78. snippet insertion condition in the message area. Modify the insertion
  79. conditions as needed.
  80. If you retain the default module setting to 'Include the snippet as a file',
  81. then the Google Search Console will report that the site is NOT setup to use the
  82. Tag Manager. This report is a FALSE POSITIVE as the bot only checks for inline
  83. code on the script tag. It does not load the snippet file and inspect the code
  84. therein. Instead of relying on this bot, check whether the GTM snippets are
  85. loaded as a result of the snippet added by this project.
  86. MAINTAINERS
  87. -----------
  88. Current maintainer:
  89. * Jim Berry (https://www.drupal.org/u/solotandem)