Advance Script Manager
This module lets you create and manage custom script code snippets, similar to how Drupal blocks work. You can control where these scripts appear on your website, such as in the head or at the bottom of the page, and specify which pages they should be visible on.
This module allows admins to create various script code snippets and control their visibility similar to the core Drupal block module. It can be used to inject various tracking scripts into the , and inside tag.
This module allows you to name your various scripts code snippets. Configuration of a single snippet provides visibility settings similar to the core Drupal block module: white/black list by Drupal path.
Currently there are three possible regions to inject your scripts snippets:
Inside - Code is added using hook_page_attachments_alter()
Inside - Code is added using hook_page_top()
Inside - Code is added using hook_page_bottom()
This is a replacement module of Tracking code in Drupal8 and Drupal9.