user3689594
user3689594

Reputation: 1

Google Tag manager and google analytics

I am trying to set up google tag Manager to help me record clicks on pop up windows that do not load a new page.

I have

    <!-- Google Tag Manager -->
    <noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-KWXJXF"
    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-KWXJXF');</script>
    <!-- End Google Tag Manager -->

And also have

       <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-49343230-2', 'opencolleges.edu.au');
       ga('send', 'pageview');

      </script>

My question is do I need both analytics and tag manger running on my pages to do this or can I just use tag manger? Also my tags are simply just not recording in Analytics.

Upvotes: 0

Views: 377

Answers (2)

Max
Max

Reputation: 148

You can and should just Use Google Tag Manager. Ensure Google Tag Manager is implemented across your entire website, just after the opening HTML body Tag on each page.

Create your Google Analytics Tag in Google Tag Manager > Tags . Create > , Select Universal Analytics. Add your Property ID and select Page View from the Drop Down.

Make sure you add the Trigger 'All Pages'.

Preview/Publish your container to see and test the results.

Use Real Time reporting in Google Analytics to check that your set up is working.

Upvotes: 0

Phil Wright
Phil Wright

Reputation: 96

The Google Analytics tag can be delivered via Tag Manager.

From overview, select New > Tag. Then in the Tag Type drop down choose Google Analytics > Universal Analytics.

Upvotes: 1

Related Questions