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. Other Research Tools
    4. GA snippets for subdomains and best tracking in MOZ

    GA snippets for subdomains and best tracking in MOZ

    Other Research Tools
    4 3 308
    • 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.
    • LisaBOS
      LisaBOS last edited by

      Hey there,

      I have a blog running at blog.URL.com.  I need to add Google Analytics and I want to track the value of this subdomain as separate from the main URL.

      Can I do that? If I do a unique snippet in the header of the blog is that the right way to go?  The main site is on an antiquated CMS system and will be converted over the next few months to a full on WP site, does that change anything long-term?

      Thanks in advance for your help.

      Cheers,

      Lisa

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

        Hi Lisa, 
        you can add Google Analytics to track the value of the subdomain as seperate from the main. You would need to create a new property in Google Analytics and then place the snippet into each page of your blog site, making sure to not include the one from URL.com.

        https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite?hl=en

        Hope that helps!
        Good Luck!

        Dana

        1 Reply Last reply Reply Quote 2
        • LisaBOS
          LisaBOS last edited by

          Thanks so much Dana, that's exactly what I needed. L--

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

            Another option is add a custom variable in Google Analytics and add the snippet to your pages:

            ga('send', 'pageview', { 'dimension1': dimension2 });

            'dimension1' is the variable which has been setup

            dimension2 is the passing variable i.e. 'Blog'

            Hope this also helps, the normal GA code will also need to be included, however this will segregate the blog traffic, but include the traffic in your overall view.

            It all depends on how you want to view the traffic on the sites.

            I also use this method to segregate product groups.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            • Editing Keywords in Moz Keyword Tracking Under Campaigns
              ScottImageWorks
              ScottImageWorks
              0
              5
              326

            • What's the best way to track broad search terms?
              controlyours
              controlyours
              0
              13
              173

            • Should I exclude prepositions in tracked keywords of moz analytics?
              LauraSultan
              LauraSultan
              1
              3
              1.7k

            • In Moz Medium Pro how many pages can you track for keyword rankings at a time? I know you can track up to 50 in Standard.
              DavidLee
              DavidLee
              0
              2
              209

            • MoZ vs Alexa & Moz vs Google
              Sequelmed
              Sequelmed
              0
              4
              2.4k

            • Moz Conversion Tracking
              xvpn902
              xvpn902
              0
              3
              184

            • Does Moz Analytics Allow for Goal Tracking?
              Miranda.Rensch
              Miranda.Rensch
              0
              4
              122

            • I already have a campaign registered in moz, but it does not appear when I open Moz Analytics, as I proceed?
              IBacana
              IBacana
              0
              4
              166

            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