Drupal 7 had the Tracking Code module that did the following:
A module that allows admins to create tracking code snippets and control their visibility similar to the core Drupal block module. It can be used to inject arbitrary code into the <head>, and at the beginning and end of the <body> tag, the most common placement for tracking code.
This module allows you to name your various tracking code snippets and organize them by weight and region. Configuration of a single snippet provides visibility settings similar to the core Drupal block module: white/black list by Drupal path, content type, and user role.
Currently there are three possible regions to inject your tracking code snippets:
- Inside <HEAD> - Code is added using drupal_add_html_head()
- After <BODY> - Code is added to $page['page_top'] using hook_page_alter()
- Before </BODY> - Code is added to $page['content_bottom'] using hook_page_alter()
We're thinking of porting this module. But, I am wondering if there is a better way to accomplish the same thing that does not require porting another module?
Recent comments
Hi Kevin I am interested assisting you developing a theme by cloning feature from existing WordPress website. Please let me know your suitable time to discuss further...
Create a theme from existing website
I've updated the Zulip link in both places I found it. No need to post again, unless you have something new to say. We'll pull together feedback from all the sources.
Backdrop CMS Core Priorities
Should we post here again, what we posted over there? Or would that unnecessarily duplicate things? The link to a Zulip thread in this initial post leads to an internal one, but there's...
Backdrop CMS Core Priorities
Let's consolidate this with https://forum.backdropcms.org/forum/weekly-dev-meetings-focus-top-wish-list-items-start-march-26-2026
Backdrop CMS Core Priorities
This is a really good idea. I nearly always search on GitHub if I'm not sure of the name. That said, there is still room for improvement in GitHub as many repos have a useless description...
Weekly dev meetings to focus on top wish list items start March 26, 2026.