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
Thanks! The site was on PHP 7.0. With assistance from my hosting provider, I updated to PHP 7.4 and now I have access to the site again. No database re-import required.
Locked out of site after updating modules
Thank you very much. I will follow your advice.
Locked out of site after updating modules
The best you can do is test and report. If you find a contrib that doesn't work in php 8.3, create an issue in its queue so it gets fixed. In my experience, I've found that 7.4 is safest...
Locked out of site after updating modules
Hi argiepiano, Some contrib will not work in php 7.2 or lower, and some will not on PHP 8.1 or higher. Is there a way to find out which is the optimal PHP version for a...
Locked out of site after updating modules
This sounds like a combination of a buggy module and the "wrong" version of PHP. The fact that you are being redirected to the maintenance page may be an indication that your site was put on...
Locked out of site after updating modules