GTM but keep GA tracking at the sametime

376 views
Skip to first unread message

Xinnie Yi

unread,
Jul 23, 2015, 11:16:32 PM7/23/15
to Google Tag Manager Fundamentals
Hi, I am new to analytics and my manager asked me to check on GTM while I am totally new to analytics.

I saw the piece of GA tracking set at our existing website, is for pageview. I wonder if I can create an container using GMT and place the tracking code into our website at the same time, I do not want to remove the old one. Is that possible?

<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-xxxxxx', 'auto');
      ga('send', 'pageview');

    </script>

analyticsacademystaff

unread,
Jul 24, 2015, 2:34:20 PM7/24/15
to Google Tag Manager Fundamentals, xinn...@gmail.com
Hi Xinnie,

Great question! You should use only one of these implementation options for Analytics pageview tracking. If you choose to fire the Analytics pageview tag through Google Tag Manager then you should remove the Analytics tracking snippet that is directly on the site. If you do not want to remove this code from the site, then you can still use Google Tag Manager for other types of tracking that you may want to do, but you should not also implement the Analytics pageview tag there. 

I hope that this helps to clarify!

Cheers,

Katie, Analytics Academy Staff

Xinnie Yi

unread,
Jul 25, 2015, 7:34:28 AM7/25/15
to Google Tag Manager Fundamentals, analyticsa...@gmail.com
Thanks Katie, how if I create another property UA-2? Meaning the old one is tracing UA-1 and GTM tracking UA-2. I just want to confirm if everything fine before port over.
Reply all
Reply to author
Forward
0 new messages