The Simple User Guide to Integrating Google Tag Manager to an Umbraco Website
A Tag Management System (TMS) replaces hard-coded tags that are used for marketing, analytics, and testing on a website with dynamic tags that are easier to implement and update. We use Google Tag Manager which is a widely used Tag Management system. In this blog, we show you how we created an Umbraco Google Tag Manager plugin to minimise the efforts needed to integrate Google Tag Manager with an Umbraco website.
Follow the below steps to integrate Google Tag Manager with your Umbraco website.
- Create Google Tag Manager account.
- Install Google tag Manager Umbraco plugin.
- Login into Umbraco Backoffice, add ‘Google Tag Manager’ compositions document type to ‘Home’ node document type as shown in the screenshot below.
- In the Content section, select the 'Home' node.
- Under Settings section, in the Master Template, add the following lines of code:
a. Paste the code ‘@Html.Partial("_GoogleTagManager")’ in the <head> tag.
b. Paste the code ‘@Html.Partial("_GoogleTagManagerNoScript")’ immediately after the opening <body> tag as shown in the screenshot below.
- In the 'Home' node select the ‘Google Tag Manager’ tab and enter your Google Tag Manager container Id in the ‘Container Id’ field as shown in the screenshot below.
- To know more details on Google Tag Manager, refer to this video.
Contact us at Gaja Digital Agency for any Umbraco plugin-related queries you may have.
Manjunath Govindappa | ASP.NET Technical Lead