Is there any module to add some new things like Google Tag Manager's code to Drupal based website? for example you should install Google analytic module to add analytic to your site, is any equivalent for Google Tag Manager?


There is an officially released module (since early 2014): GoogleTagManager.

Allow the non-technical stakeholders to manage the analytics for their website using the Google Tag Manager (GTM). This module allows you to trigger the insertion of tags and tracking systems onto the pages of the site.


You might be interested in:


This module provides a way to serve DoubleClick's Google Publisher Tag (GPT) (Premium and Small Business) ads on Drupal.

Benefits of GPT

The new Google Publisher Tags have multiple benefits over Google Ad Manager (GAM) tags and the legacy DoubleClick for Publishers Dart tags.

  • Asynchronous
  • Ad loading does not block the page from rendering, improving page load time. Can be disabled if desired.
  • Google Publisher Console
  • Accessed by loading a page of your site with ?google_console=1 appended to the URL page and using the keyboard shortcut Ctrl+F10 to toggle the console.
  • Single request mode
  • The browser sends a single request for retrieving all add units for the page, enabling advanced roadblocking and improving page load time.
  • Multiple instances of the same ad unit on a page
  • SSL support
  • Slot-level custom targeting
  • Refreshing ad slots on a page
  • this is completely different thing than the one in question. – Łukasz Rysiak Aug 7 '14 at 20:13

There are two sandbox modules: GTM and Google Tag Manager, both are for Drupal 6, you can easily port them to Drupal 7.


you should use these two:



First one installs GTM on your page, second one enables passing many variables and taxonomies to be passed to dataLayer. It also has an alter function, if you'd like to add some extra data (since the module is written in a general way and i.e. extracting taxonomies from json arrays on the GTM side can be complicated).


Installing Google tag manager is a bit complex, specially on CMS such as Drupal, here’s a complete tutorial for it at: https://www.cloudways.com/blog/install-google-tag-manager-drupal/ Its very easy to follow I hope others will find it usefull too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.