Can I replace Google Analytics with Google Tag Manager?

So my site embeds the Google Analytics code, the one that looks like this:

      <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

      ga('create', 'UA-XXXXXXXX-X', 'mydomain.com');
      ga('send', 'pageview');

    </script>

I’ve been reading up on Google Tag Manager which has Google Analytics tag support. Does this mean I can safely remove the Google Analytics code currently on my site and replace it with the Google Tag Manager code?

I’m only doing very basic stuff with Google Analytics at the moment, mainly just checking the data it collects by default. I have a few links tagged with campaign data but those can be re-created if necessary.

Does Google Tag Manager send the analytics data to my Google Analytics account? Or would I have to go to my Google Tag Manager page to view the data?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.