Here is a step-by-step guide to help you add GTM to Drupal. Our Server Management Support team is here to lend a hand with your queries and issues.
How to add GTM to a Drupal website
GTM or Google Tag Manager can be described as a tag management system that enables us to update measurement codes as well as code fragments to our website or mobile app easily and quickly.
Today, our experts are going to demonstrate how to add Google Tag Manager to Drupal.
- First, we have to download the GTM module with this command:
composer require 'drupal/google_tag:^1.4'
- Then, we have to head to the admin toolbar and navigate to System under Configurations. Then select Google Tag Manager.
- Next, select Google Tag Manager, this will take us to a container page.
- After that, click the Add Container button, here we have to add the Container ID that we had created earlier when we signed up with Google Tag Manager. https://tagmanager.google.com/
- Then, head to Account setup and enter the Account name as well as the Country name.
- After that, enter the Container name and choose the target platform under Container Setup.
- Finally, click the Create button.
- At this point, we will see a popup screen that displays the code snippet that has to go in the head section. We can get the Container ID from this code. It will be an alphanumeric word that begins with GTM as seen below:
- Now, we have to head back to the Drupal setup and add the container ID. Add a name for the container in the Label field and paste the Container ID we got in the previous step in the Container ID field. Then save the configuration.
- Finally, we can verify of the process has been successful by heading to the home page of our website and selecting “Inspect Element”. If successful, we will be able to see GTM within the head tag.
[Need assistance with a different issue? Our team is just a click away.]
Conclusion
To sum up, our Support Engineers demonstrated how to add GTM to a Drupal website with ease.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
0 Comments