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, I wasn't aware of that. That goes back to D7 ways! I do like that these config files are JSONish, and so I can edit them easily by hand (for doing bulk substitution), which is painful in...
Views JSON config files location
Hi @onyx. When you prepare your module files you can add the config for those views into the module folder under config. When someone installs the module then the config is copied into their...
Views JSON config files location
@onyx - I do not have a good answer for you. Remember, BackdropCMS now allows you to store all of your config in the database, if you prefer. https://docs.backdropcms.org/change...
Views JSON config files location
Thanks, I see! So you're trying the same method as I did. At the moment, I don't have ideas why it should fail on your site. Maybe have a look at the database log (admin/reports/dblog)?
Error upgrading
Hello, I am trying to update using built-in update, same method as previous updates.
Error upgrading