Uploaded image for project: 'Magnolia Google Analytics'
  1. Magnolia Google Analytics
  2. MGNLGA-9

Update Google Analytics tracking code

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Major
    • 1.1.3
    • None
    • None

    Description

      Google have made changes to Analytics and we need to update our tracking code. New code which needs to replace old code here, also attached.

       <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-xxxxx-y']);
      _gaq.push(['_trackPageview']);
      (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; 
      
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
      </script>
      with the bold text in the example below:
      
      <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-xxxxx-y']);
      _gaq.push(['_trackPageview']);
      (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; 
      
      ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
      
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
      </script>

      Details from google here: https://support.google.com/analytics/answer/2444872?hl=en

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              tgregovsky Tomáš Gregovský
              bprice Ben Price
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Task DoR