Add Google Analytics tracking in Google Tag Manager

  1. Login to Google Tag Manager with your Google account.
  2. In Workspace click Tags > New.

    Google Tag Manager: Add New Tag
    Google Tag Manager: Add New Tag
  3. Rename the tag to GA - Pageview - All Pages by clicking inside and rewriting the Untitled Tag field.

    Google Tag Manager: Rename a tag
    Google Tag Manager: Rename a tag
  4. Click on Tag Configuration and select Universal Analytics.

    Google Tag Manager: Tag Type Universal Analytics
    Google Tag Manager: Tag Type Universal Analytics
  5. Leave Track Type: Page View.
  6. In Google Analytics Settings click Select Settings Variable and select New Variable.

    Google Tag Manager: Select Settings Variable
    Google Tag Manager: Select Settings Variable
  7. Open a new browser tab, go to Google Analytics, navigate to Admin > Tracking Info > Tracking Code for the correct Property, and copy the Tracking ID to your clipboard.

    Google Analytics: Tracking ID
    Google Analytics: Tracking ID
  8. In Variable Configuration, under Google Analytics Settings, paste the tracking ID into the Tracking ID field.

    Google Tag Manager: Google Analytics Settings Tracking ID
    Google Tag Manager: Google Analytics Settings Tracking ID
  9. Leave Cookie Domain: auto.
  10. Rename the variable to GA Tracking ID by clicking inside and rewriting the Untitled Variable field.

    Google Tag Manager: Rename the variable
    Google Tag Manager: Rename the variable
  11. Click Save.
  12. Click Triggering
    Google Tag Manager: Triggering
    Google Tag Manager: Triggering

    and select All Pages.

    Google Tag Manager: Trigger All Pages
    Google Tag Manager: Trigger All Pages
  13. Click Save.
  14. Click Preview.

    Google Tag Manager: Tag Preview
    Google Tag Manager: Tag Preview
  15. Open a new browser tab and load the website’s home page (reload it, if already loaded). The Google Analytics tracking code is working properly, if you see the name of the tag among the Tags Fired On This Page in the debug pane.

    Google Tag Manager: The Google Analytics tag fired correctly
    Google Tag Manager: The Google Analytics tag fired correctly
  16. In Workspace, click Leave Preview Mode and confirm OK to leave.

    Google Tag Manager: Leave preview mode
    Google Tag Manager: Leave preview mode
  17. Click Submit.

    Google Tag Manager: Submit
    Google Tag Manager: Submit
  18. Write a descriptive name and a description of actions performed.

    Google Tag Manager: Container Version
    Google Tag Manager: Container Version
  19. Click Publish.
Share