Skip to main content
All CollectionsSettingsGeneral
How to configure a google analytics variable (GTM)
How to configure a google analytics variable (GTM)

Discover how to configure a google analytics variable.

François P. avatar
Written by François P.
Updated over a week ago

In order to properly configure Google Analytics via Google Tag Manager, you need to complete the following steps:

  • Set up the Google Analytics UA variable in GTM variables;

  • Create the GA tag "Page views" in the GTM tags;

  • Configure the trigger associated with the tag;

  • Publish the new version of the container.

To create the UA variable, you must first retrieve the tracking ID from your Google Analytics account (we assume your account is already created, let us know if you have any problems with this)

In the Google Analytics admin, go to Property > Tracking code, then copy the tracking ID displayed at the top of the page. In my case, my tracking ID is: UA-185794038-1.

Then go to the Variables tab in Google Tag Manager.

Click on "New" under "User-Defined Variables".

Choose "Google Analytics Settings”.

Paste your GA tracking ID into the Tracking ID field of the variable, and rename your variable. In my case, I named it GA - UA ID

Finally, save!

The next step to set up the integration would be to create the GA tag "page views" before publishing the new version of our GTM container. To learn how to do it, please visit this article.
For more in depth information regarding how to use this tool, please visit this article.

Did this answer your question?