Add Google Analytics Tags in GTM



Business Benefits

Track user behaviour, marketing results and site performance.

In Google Analytics navigate to Admin > Property Settings and copy your Tracking Id.

The Tracking Id starts with “UA” and is followed by a number. For example: UA-123456-7.

Sign in into Google Tag Manager navigate to the Variables option, click New to create a new Variable.

Choose Google Analytics Settings under Utilities, name your variable, paste your Tracking Id in the text box under Variable Configuration, and click Save.

  • Name your variable something memorable. For example, “Google Analytics Settings - My website”
  • Setting Cookie Domain to auto is recommended for new implementations to automatically determine the best cookie domain to use

Sign into Google Tag Manager, navigate to the Tags option in the left menu, click New and select Google Analytics: Universal Analytics under Featured.

Name your tag something memorable to distinguish it from the rest. For example, “Google Analytics - Pageview”

Select the Track Type and enter the variable you created previously as the Google Analytics Settings under Tag Configuration, choose a trigger, save the tag and test it.

  • Different Track Types are available depending on what you are measuring. When starting a new website the Page Views must be set up.
  • At Google Analytics Settings choose the variable we created and the previous steps.
  • Choose the trigger to fire on all pages, save the tag and preview the container to test it.

Last edited by @hesh_fekry 2023-11-14T11:45:32Z