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
With the threat of Drupal 7 EOL looming, and a very out of date Drupal 6 site that no longer worked with newer php versions, I made the decision to move both sites to Backdrop in March 2024. ...
Happy Birthday Backdrop CMS - Share your projects!
Happy Birthday Backdrop CMS! Thanks to the team for everything you do and I'm glad to be part of the people who have been using this system since version 1.1 :)) I have built more than 100...
Happy Birthday Backdrop CMS - Share your projects!
I have a handful of projects I have migrated from Drupal 7 sites, and a number of new sites I have built. Here's my list: Twin Cities Amnesty https://twincitiesamnesty.org...
Happy Birthday Backdrop CMS - Share your projects!
I'll start! My company Triplo, has been building Backdrop CMS sites and upgrading Drupal 7 sites to Backdrop for about 6 years now? Here are a few of the Backdrop sites we have...
Happy Birthday Backdrop CMS - Share your projects!
Sure, I could set up an site on my server for testing this.
Drupal 7 Migration, content_access issue