GTM and Google Analytics

GTM in conjunction with Google Analytics: A couple steps you need to take. 05 MIN READ

Edgar Barrón avatar
Written by Edgar Barrón
Updated over a week ago

This article may guide you a little.

As always, remember that you can be guided in more detail on the official sites:

Install and set up Google Analytics with Google Tag Manager (tutorial)

  • Please, follow the next steps:

1.- You’ll need to remove your GA code from your site pages. You’ll only need your Google Tag Manager tag code embedded -- if you use both, it’ll just report everything twice and mess up your data.

2.- You’ll probably want to create a variable for your Google Analytics Tracking ID. A variable is a Google Tag Manager tool meant to increase your efficiency by saving additional (optional) data you provide.

If you save your GA Tracking ID as a variable, you won’t have to look it up every time you create a new tag for Google Analytics.

How to Create a Variable in Google Tag Manager

1. Click “Variables” on your Google Tag Manager homepage.

2. Under “User-Defined Variables”, click “New”.

User Definition in Google Tag Manager

3. Name your variable.

In this example, we named “GA Tracking ID” (you need to choose your names).

Then, click the “Variable Configuration” box.

Name your variable

4. Pick a variable type.

Choose “Constant” as your variable type, since you don’t want the ID to change for different tags.

Choose your variable type.

5. Save your settings.

Now, input your Google Analytics Tracking ID number into the “Value” box, and then select “Save” in the top right.

Save your variable.

Next, let’s edit our “TestTag1” that we created earlier in this post, and include the new variable you just created.

How to Edit a Tag and Change its Value

1. Select a tag to edit.

Back on your homepage, select “Tags” from your side bar. Click on the tag you want to edit (In this example, we clicked “TestTag1”).

2. Click the grey “+” icon beside the “Web Property ID” box.

gray plus icon for tags

3. Edit a variable.

A “Choose a variable” box will pop up, and the first option, “GA Tracking ID”, is the variable we just created. Select that.

Edit variables in Tag Manager

4. Click Save.

Now, your tag’s “Web Property ID” should say (or whatever you named your variable). Click "Save", and your tag is updated.

Save your Google Tag updates

Done!

Adext - eSemanal - Noticias del Canal


Did this answer your question?