The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Online Marketing Tools
    4. Google Analytics Tracking code changes

    Google Analytics Tracking code changes

    Online Marketing Tools
    4 2 474
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • PHD
      PHD last edited by

      Hello

      I'm trying to update the google analytics code on this site, so that we can take advantage of the updated features in Google analytics.

      looking at the cod on the HP I see the below code:

      script type="text/rocketscript" >(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-22519110-2','auto');ga('require','displayfeatures');ga('send','pageview');

      I was hoping someone could help me as I can't figure out what we've done wrong, as the current code is working for standard analytics features but not the new features, such as demographic reports etc....

      Many thanks

      1 Reply Last reply Reply Quote 0
      • Martijn_Scheijbeler
        Martijn_Scheijbeler last edited by

        Have you looked in to the fact that using rocketscript might cause Google Analytics to not fire certain events?

        PHD 1 Reply Last reply Reply Quote 0
        • PHD
          PHD @Martijn_Scheijbeler last edited by

          HI Martijn

          Thanks for your response. To be honest I have no idea what rocketscript is... but will do a bit of research. Anything more you could tell me to help would be greatly appreciated.

          Many Thanks

          Martijn_Scheijbeler 1 Reply Last reply Reply Quote 0
          • Martijn_Scheijbeler
            Martijn_Scheijbeler @PHD last edited by

            Hi,

            For now that's the only thing that I saw was off from a usual implementation of the tracking code. As you're using rocketscript as the type of the tags the events might not get fired correctly.

            1 Reply Last reply Reply Quote 1
            • 1 / 1
            • First post
              Last post
            • Google Search Console linking with Google Analytics
              jacleaves
              jacleaves
              0
              2
              113

            • Universal Google Analytics Code Migration
              Martijn_Scheijbeler
              Martijn_Scheijbeler
              0
              3
              101

            • URL changes in Google Analytics and Google Search Tools
              whitewallmarketing
              whitewallmarketing
              0
              4
              109

            • What is the difference between "Event tracking" and auto-tag event tracking with Google tag manager?
              esiow2013
              esiow2013
              0
              5
              644

            • When I can place the Google Analytics javascript code in my web pages?
              S_Curtis
              S_Curtis
              0
              3
              164

            • Moving domain - Google Analytics tracking code
              Richard555
              Richard555
              0
              3
              306

            • What's the difference between Google Conversion Tracking Code vs Floodlight Tags
              JasmineA
              JasmineA
              0
              2
              5.3k

            • Google Analytics Goal - Track Click Through to Any Page on Site
              JaredMumford
              JaredMumford
              0
              6
              1.4k

            Get started with Moz Pro!

            Unlock the power of advanced SEO tools and data-driven insights.

            Start my free trial
            Products
            • Moz Pro
            • Moz Local
            • Moz API
            • Moz Data
            • STAT
            • Product Updates
            Moz Solutions
            • SMB Solutions
            • Agency Solutions
            • Enterprise Solutions
            • Digital Marketers
            Free SEO Tools
            • Domain Authority Checker
            • Link Explorer
            • Keyword Explorer
            • Competitive Research
            • Brand Authority Checker
            • Local Citation Checker
            • MozBar Extension
            • MozCast
            Resources
            • Blog
            • SEO Learning Center
            • Help Hub
            • Beginner's Guide to SEO
            • How-to Guides
            • Moz Academy
            • API Docs
            About Moz
            • About
            • Team
            • Careers
            • Contact
            Why Moz
            • Case Studies
            • Testimonials
            Get Involved
            • Become an Affiliate
            • MozCon
            • Webinars
            • Practical Marketer Series
            • MozPod
            Connect with us

            Contact the Help team

            Join our newsletter
            Moz logo
            © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
            • Accessibility
            • Terms of Use
            • Privacy