Blog
SignalHost for Drupal: install the module, connect once, and server-side tracking is live
Published · 6 min read
The SignalHost module puts server-side Google Tag Manager on a Drupal site without a single line of pasted code. It adds the tracking loader to every page that is not an administration page, keeps it up to date when anything changes on our side, and takes it off again when you disconnect. This guide follows the order you meet it in: installing the module, connecting a container, checking that it works, and what to do when something does not.
Before you start
- Drupal 10.3 or 11, running on PHP 8.1 or newer with the sodium extension, which has been part of PHP since 7.2.
- A SignalHost account. The free plan is enough to try it: 10,000 requests a month and one container. You can create the account while connecting.
- An account with the Administer SignalHost Server-Side Tagging permission. Only users who have it can connect or disconnect the site.
1. Install the module
Install it like any contributed module from its project page on drupal.org: add it with Composer, then enable it.
composer require drupal/signalhost_server_side_tagging
drush en signalhost_server_side_taggingWithout Drush, enable it under Extend, where it is listed as SignalHost Server-Side Tagging in the Statistics group. It prints nothing until the site is connected.
2. Connect the site to a container
Open Configuration › Web services › SignalHost (/admin/config/services/signalhost) and press Connect with SignalHost. If you have no account yet, Create a free account takes you to the sign-up instead. Nothing is sent to SignalHost before you press Connect.
On signalhost.io, sign in. The next screen lists what the module will and will not be able to do, and asks which container the site should use. A container is your own tagging server: a Tag Manager web container and server container, built in your own Google account, so they stay yours.
Pick an existing container, or press New container for your site and go through the short wizard. A new one takes a few minutes to build; you can connect straight away, and the code is added as soon as it is ready. Press Connect. You land back on the SignalHost page in Drupal with the message Connected. SignalHost's code is now added to every page of your site.
3. Check that the code is on your site
The page now says Tracking is live, or Tracking starts as soon as your container is ready while a new one is still being built. Then read the line On your home page: right after connecting, the module fetches your home page the way a visitor would and looks for its code. Code found is the answer you want. Check again repeats the check at any time, and the other answers are under When something does not work.
4. Test it
Open your site in a private window and click through a few pages; a visitor who declines your cookie banner is still counted, as Google's cookieless ping. Then press Open statistics & settings to open your container page on signalhost.io.
Under Enhanced analytics, the Recent tab shows the page views of the last 30 minutes, yours among them. Run checks, under Troubleshooting at the foot of the page, compares what your tagging server received with what Google Analytics reports for the same 30 minutes. Fewer in Analytics is normal: it leaves out visitors who declined cookies. From the Growth plan up, Live event monitoring shows each event as it arrives.
What the module adds to your site
One small script, and one hourly check-in:
- The Google Tag Manager loader, in the head of every page that is not an administration page, pointed at your own tagging address instead of googletagmanager.com. It loads your Tag Manager container from there. The module builds it itself from two checked values; nothing SignalHost sends is ever printed as script. Those pages carry a cache tag, so the page cache refreshes whenever the loader changes, pages cached before you connected included.
- Once an hour, after a response has been sent, the module checks in with signalhost.io to stay current. It sends only the module's, Drupal's and PHP's versions, your site's address and whether the code was found on your home page: no visitor data, no content, no user accounts. If signalhost.io cannot be reached, the site keeps the last good configuration. Nothing it stores travels with a configuration export.
Every request leaves the browser in a form ad blockers do not recognise, and your tagging server forwards it to Google Analytics 4 and to the ad platforms you set up on the container page: Google Ads, Meta, TikTok and others. The tracking follows your cookie banner through Google Consent Mode; put your banner's code before SignalHost's.
The module does not read forms or orders, Drupal Commerce included. Page views arrive on their own; a purchase or a lead reaches your container when your site pushes it to the data layer.
Your own tracking domain
Your container starts on an address under signalhost.io. On a paid plan, Set up your own domain on the container page moves it to a subdomain of your own site, such as sgtm.yoursite.com, with one DNS record at your provider. That address survives filter lists and keeps click cookies first-party. When it goes live, the module switches your site over at its next check-in, usually within the hour, and the cache tag refreshes your cached pages. Nothing needs replacing by hand, and the old address keeps working until then.
Adding SignalHost by hand
You can also paste the code yourself. On the container page, find your snippet in the Install on your site card and press Copy. Paste it into the head of every page (in Drupal, through your theme), directly after your cookie banner's script, and press I have done this. Copy for AI agent hands the same job to a coding agent.
Pasting by hand gives up what the module does: nothing checks your home page, nothing removes the code when you disconnect, and when your own domain goes live you replace the code yourself, from the card's Update your website snippet or the email announcing the domain. Never use both routes: two copies count every visit twice.
Updates, managing and disconnecting
Updates come through Composer, and Drupal's update status reports new releases, as for every drupal.org module.
Disconnect, on the SignalHost page, asks once: Disconnect this site from SignalHost? Confirming revokes the site's access, takes the code off every page and refreshes your cached pages. Your container and its statistics stay, and you can connect again at any time.
On signalhost.io, the container page says Installed by the Drupal module on your site. Its Manage button leads to Settings, Connected sites, where Disconnect works too: the module stops loading SignalHost at its next check-in, usually within the hour.
Uninstalling the module also revokes the site's access and removes everything the module stored.
When something does not work
- Could not check (your server refused a request to itself): your host blocks requests to its own address. That says nothing about your visitors; look for your tagging address in your home page's source.
- An older copy is on the page, or The code is on the page twice: a copy was pasted by hand into a theme, a block or another module. Remove it; the module adds the current one, and two copies count every visit twice.
- A notice that your site already loads a Tag Manager container with Google's own snippet: remove that snippet, because SignalHost now loads the container and both together count every visit twice. The same goes for the Google Tag Manager module (google_tag): use one or the other, not both.
- This site's address has changed since it was connected: on a copy, such as staging, nothing is sent. If the live site moved, disconnect and connect again.
- Last update is old: the module checks in after page requests, never from cron. Opening the SignalHost page runs a check-in too, and Check again forces one.
- Anything else: write to hello@signalhost.io with your site's address.
Trademarks
SignalHost is an independent product of Algorithmo GmbH and is not affiliated with or endorsed by the Drupal project, Google, Meta or TikTok. Google Analytics, Google Ads and Google Tag Manager are trademarks of Google LLC; Meta is a trademark of Meta Platforms, Inc.; TikTok is a trademark of ByteDance Ltd.; Drupal is a registered trademark of Dries Buytaert.

