AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
2.8K members online now
2.8K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Google Tag Manager

Explorer ✭ ☆ ☆
# 1
Explorer ✭ ☆ ☆

Hi,

 

Can Google tag manager and Google analytics code exist on the same website. Or for implementing Google tag manager, we need to remove GA code already placed on the site.

 

Cheers

Google Tag Manager

[ Edited ]
Participant ✭ ✭ ✭
# 2
Participant ✭ ✭ ✭

Hi,

 

Yes, they can. Keep in mind that if you want to combine tracking across the two methods (GA code + GTM code), you need to make sure that tracker settings match across the board. If you'd like to learn more, I recommend reading this article.

 

Hope this helps.

Taavi

 

Google Tag Manager

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Thanks. But still i am a bit confused. The article which you shared says "if you don’t mess with the tracker name setting, there will be no interference"  

 

Is there tracker name settings in GA code ? I am not clear about the above point. Can you please elaborate.

 

Thanks

Google Tag Manager

Participant ✭ ✭ ✭
# 4
Participant ✭ ✭ ✭

Hi,

 

Let's clarify this. 

 

Let's say that you've installed 2 Google Analytics codes on your website. They both should have different tracker objects. To track data for two separate properties, you need to create two separate trackers, and at least one of them must be a named tracker.

 

The first one can be a "default" tracker. Creating a tracker without setting the name field is known as creating a "default" tracker. A default tracker is internally given the name "t0". It's not visible (t0) as you can see. So now, if you create a new tracker, you should give it a name. Let's say it's called t1.

 

Examples:
ga('create', 'UA-XXXXX-Y', 'auto'); // default tracker - first property
ga('create', 'UA-XXXXX-Z', 'auto', 't1'); //additional tracker named t1 - second property

ga('send', 'pageview'); // sends pageview for default tracker - first property
ga('t1.send', 'pageview'); // sends pageview for t1 - second property

 

Now, as long as you're using only one Google Analytics code on your website, you don't have to change or modify anything in GTM. But if you're sending data to different properties, you have to make sure that you don’t mess with the tracker name settings.

 

For example, to track data for two separate properties, you need to create two separate trackers and you have to define them in GTM as well.

 

To sum up, if you only track data for one property (you have only one GA code on your website), you don't have to change or modify anything. You can have Google Tag Manager and Google Analytics code on the same website and you don't have to think about tracker settings.

 

Hopefully, it's now easier to understand.

 

Cheers,
Taavi

 

 

Google Tag Manager

Explorer ✭ ☆ ☆
# 5
Explorer ✭ ☆ ☆

Thanks. Much easier to understand. One question. Hope you don't mind.

"Now, as long as you're using only one Google Analytics code on your website, you don't have to change or modify anything in GTM. But if you're sending data to different properties,"

 

Under what circumstances, do we have to send data to different properties ? As far as i understand, if i have to track just one website, i should be tracking only that property ? Right ? 

Re: Google Tag Manager

[ Edited ]
Participant ✭ ✭ ✭
# 6
Participant ✭ ✭ ✭

Under what circumstances, do we have to send data to different properties ? As far as i understand, if i have to track just one website, i should be tracking only that property ? Right ? 

Great question! Let's say if more than one company wants to see data (your partner organization or client wants to see data for a specific subdomain of your site for example etc) or if you'd like to test a new technical implementation then you might have to send data to different properties.

 

If you have one website and none of your partner organizations or clients need access to your data or you're not testing any technical implementations, you can use only one property and everything is fine.

 

Hope this helps.

Taavi

 

Google Tag Manager

Explorer ✭ ☆ ☆
# 7
Explorer ✭ ☆ ☆

You have been very patient so far and i think i am very close to finding the right answer.

Google Tag Manager

[ Edited ]
Participant ✭ ✭ ✭
# 8
Participant ✭ ✭ ✭

If I were you, I would remove the existing GA code already placed on the site and move GA tag into Google Tag Manager. Here's a guide. Then you'll have everything in one place. Keep in mind, if you implement Google Analytics via Google Tag Manager, you'll need to remove the existing Google Analytics code from your website. Otherwise, you'll see duplicated page views in Google Analytics. Here's a guide that describes how you can safely migrate from Google Analytics code to Google Tag Manager.

 

But like I mentioned earlier, everything works well if you continue to have Google Analytics code on your website. It's your personal choice which solution is better for you. This is the article that I mentioned previously and what describes those technical details. Smiley Happy

 

Hope this helps. Let me know if you have any further questions @Jackspwter.

Taavi