I have Google Analytics installed, and I would like to install Google Tag Manager. How do I install GTM and not lose my GA data? I know that normally GA is installed after GTM. Is there a way to add GTM to GA? I think I am using the UA version. Or do I need to uninstall Google Analytics and start all over with GTM?

  • When I went to developers.google.com/analytics/community, they say to ask questions about Google Analytics in Stack Overflow: Stack Overflow is the best place for developers to ask and answer questions about Google Analytics. The Google Analytics team and Developer Experts regularly monitor Stack Overflow to answer questions and suggest solutions. Follow our tags: google-analytics and google-analytics-api. When I asked this question in Stack Overflow, they wanted me to move it here.I'm not sure I am in the right place to ask this question, as I have not had any responses.
    – techygal
    Commented Nov 27, 2016 at 2:13

2 Answers 2


Tag Manager lets you inject the Google Analytics code. It's not replacing it and if you're using the same UA number - it's the same dataset. [Example of Analytics in Google Tag Manager


You definitely don't need to "uninstall" GA if you plan in migrating over to GTM. A possible strategy you might consider is to:

  1. include the GTM snippet on all your pages - this has no negative affect on GA at all. You're just putting the GTM code on your site without any tags yet.
  2. In GA, create an additional property for you to send TEST data into. You'll need this later on when you create your GTM tags.
  3. In GTM, create a page view tag that sends data to the TEST property. You should also tag your events and anything else you are already tracking with GA, because you basically want to replicate all your GA tracking but with GTM (and send all that into the TEST property).
  4. Allow this tag to collect data CONCURRENTLY with the normal GA tracking. You'll be able to see if GTM is correctly placed on all pages, as the pageview data and all other data should be about the same. At this point, you still are not impacting your GA tracking.
  5. Once you are satisfied that GTM has collected valid and accurate data, you can then consider removing the on-page GA code.

In this way, there is no data loss at all and you should be able to easily transition into GTM.

Note that the steps above are rough (and possibly incomplete), but the major steps are there, and you should make sure you do thorough testing!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.