4 Replies Latest reply on Mar 3, 2014 2:54 PM by Trish Voskovitch

    adding google analytics code to a landing page

    Megan Raftery
      Exactly what code should be added?  Do I keep all script tags?
      This is what it looks like right now on the landing page:

           <?php echo $mContext['endElements']; ?>
            
           <!-- GOOGLE ANALYTICS.  ENTER YOUR CODE and UNCOMMENT block -->
            
           <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
           </script>
           <script type="text/javascript">
           _uacct = "
             (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-44599329-1', 'newscyclesolutions.com');
             ga('send', 'pageview');";
           urchinTracker();
           </script>
            
            
           </body>
           </html>

      This is the google tracking script:
                <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-44599329-1', 'newscyclesolutions.com');
                  ga('send', 'pageview');
                 
                </script>