Should I remove GA/GDN code if I'm using GTM? - google-analytics

Does GTM code + GA/GDN Tag is enough to track my website analytics ? should I remove GA code if I'm using GTM ?
And aboud google adwords goals , should I remove Google adwords code too and use that one provided from GTM ?

Does GTM code + GA/GDN Tag is enough to track my website analytics ?
Yes, if you have configured the GA tracking tag in the tag manager you do not any other GA code on your site.
should I remove GA code if I'm using GTM
Yes. You do not need it anymore and if you do not remove it you might track your pages and event twice.
And aboud google adwords goals , should I remove Google adwords code
too and use that one provided from GTM
While it is still possible to use the Adwords code side by side with the tag manager it does not make any sense. As a matter of elegance and maintainability I'd say YES, you should remove page code and use GTM instead. Having all tags in one location is after all the point of GTM.

Related

Can you add two Google Analytics tracking codes to the same webpage?

I am looking to add two Google Analytics tracking codes to the same web page. Specifically one through Google Tag Manager and one hardcoded on the page. Is this possible to do with one being in GTM? I read you have to set two tracking objects, but how do I implement that if both codes aren't hardcoded on the page?
Thank you.
You can add a tracking code in GTM and another in page.
They will work independently as long as you don't do something strange with tacker names.

Switch from Google Analytics to Tag Manager

I have site which run on Google Analytics for some time( more than 1 year), now I want to use Google Tag Manager. If i remove Google Analytics from site, and start tracking with tag manager, there is a risk of losing data?
It's really hard to give a helpful answer to that - if you manage a seamless switch between GTM and inline GA code, and have set up everything correctly then you will not lose data. Is there a risk you make mistakes ? Probably.
I recommend to integrate GTM alongside GA and set up your GA tags so that they track to a test property. Then you can compare both properties to make sure that you track actually the same things. And that point you can throw out the inline GA code and switch to GTM (if you implement the tracking id as a variable in GTM it will be as simple as changing a single variable).
But remember to actually remove the inline code, else you will end up with double pageviews.

Adding GTM to a website with GA

I have a website that has been using GA for some time. Now someone wants me to add it to theirs GTM and replace my snippet with that GTM tag.
I don't know how to use GTM and don't really want to dig into that :/
My website was working just fine... Is there some easy way to make GTM just a simple middle man that looks at my domain and just throw everything directly to GA?
I manage to make it so GA gets info on the website traffic like active users etc. however that website has scripts that fires events to GA.
After googling a while i think this is because GTM adds some random names to the trackers and my code calls ga('send', ... ) directly :/
I know i can make a custom tag in GTM but they want it to be UA tag -_-.
Is there any way to set a default name for my trigger in GTM settings? Or some other solution?
atm. i have a code with gtm tag only and I'd rather avoid changing my web code if possible.
Edit
Ok, could someone explain to me how to achieve this:
I have this code:
var a = $('meta[property="a"]').attr('content');
var b = $('meta[property="b"]').attr('content');
ga('send','event',a,event,b);
where event is one of several possible strings of for example 'event_1','event_2' or'event_3'
and my GA has 3 goals that have action = 'event_1' etc.
How do i replace this with GTM and dataLayer?
This thread has 2 questions :
1.- Migrate a hardcode implementation of Google Universal into Tag Manager is not so simple as copy and replace the Universal Main Snipper for the GTM Code.
Look for this google guide to migrate. Has more or less the steps needed and the one to take in consideration during the migration.
https://developers.google.com/tag-manager/devguide#migration
If you goes for GTM, it's higly recomended to remove your ga() function on the page, this will stop working and you javascript too. Basically this mean, remove all your Google Analytics of the domains and install GTM and configure the corrects tags. Try to avoid things like paste the Google Analytics code inside a custom HTML tag, it's a very bad practice, but is see that a lot. Plan your migration
2.- Regarding the event you have to do :
Create a tag of universal analytics events and activate when you pushes a GTM event, them manage this values via the dataLayer
Let this link for more information:
https://support.google.com/analytics/answer/6164470?hl=en
var a = $('meta[property="a"]').attr('content');
var b = $('meta[property="b"]').attr('content');
dataLayer.push({'event': 'ga_event' , 'cat' : a , 'act' : b})
Try to involve more yourself in the GTM and Universal's World before ask, i'm not trying to be an asshole, but this question involves so many things that can be solved just looking the documentation, and somany thing to examplain in a single post.

Switch to Tag Manager, will Enhanced Ecommerce still work?

I've successfully implemented Google Enhanced Ecommerce on one of my websites, where I also have a Google Universal Analytics tracking code. Now we want to change to Google Tag Manager, thus replacing the UA tracking code with the Tag Manager Code (correct?)
Will this affect the Enhanced Ecommerce tracking in any way? Or can I just replace the tracking snippet and the ga('create')-parts with the Tag Manager-snippet?
You need a correctly set up dataLayer (which rather more complicated since you need info on product impressions etc). Documentation is here:
https://developers.google.com/tag-manager/enhanced-ecommerce#enable
Then you create a news Analytics Tag (just a pageview or event, there is no need for a separate transaction tag) and select "Enhanced Ecommerce" with the "Use datalayer" option in the advanced settings.
GTM will pick up the values from there datalayer and do the rest for you.
So yes, you can get this to work, but it requires a lot of preparation for the correct datalayer implementation. Simply replacing the GA code with the GTM code will do very little except breaking your tracking.

Google Analytic not required

I have created a new website and trying to add Google Analytic stumbled upon Google Tag Manager. Looks like based on what I am seeing there I don't need to create Google Analytic account at all. Am I right or I am missing something?
GTM is just a tag manager. A tag manager outputs tags based on rules and data layers and stuff. GTM has tight integration w/ GA (as opposed to just outputting the code in a generic container) since it's a google product. But GTM is separate from GA. You still need to create a GA account and specify that acct # in GTM. All GTM does is output the GA code. GTM does not collect the data or provide reports. That's what GA is for.

Resources