undefined
Skip to content
Moz logo Menu open Menu close
  • Products
    • Moz Pro
    • Moz Pro Home
    • Moz Local
    • Moz Local Home
    • STAT
    • Moz API
    • Moz API Home
    • Compare SEO Products
    • Moz Data
  • Free SEO Tools
    • Domain Analysis
    • Keyword Explorer
    • Link Explorer
    • Competitive Research
    • MozBar
    • More Free SEO Tools
  • Learn SEO
    • Beginner's Guide to SEO
    • SEO Learning Center
    • Moz Academy
    • SEO Q&A
    • Webinars, Whitepapers, & Guides
  • Blog
  • Why Moz
    • Agency Solutions
    • Enterprise Solutions
    • Small Business Solutions
    • Case Studies
    • The Moz Story
    • New Releases
  • Log in
  • Log out
  • Products
    • Moz Pro

      Your all-in-one suite of SEO essentials.

    • Moz Local

      Raise your local SEO visibility with complete local SEO management.

    • STAT

      SERP tracking and analytics for enterprise SEO experts.

    • Moz API

      Power your SEO with our index of over 44 trillion links.

    • Compare SEO Products

      See which Moz SEO solution best meets your business needs.

    • Moz Data

      Power your SEO strategy & AI models with custom data solutions.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Free SEO Tools
    • Domain Analysis

      Get top competitive SEO metrics like DA, top pages and more.

    • Keyword Explorer

      Find traffic-driving keywords with our 1.25 billion+ keyword index.

    • Link Explorer

      Explore over 40 trillion links for powerful backlink data.

    • Competitive Research

      Uncover valuable insights on your organic search competitors.

    • MozBar

      See top SEO metrics for free as you browse the web.

    • More Free SEO Tools

      Explore all the free SEO tools Moz has to offer.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Learn SEO
    • Beginner's Guide to SEO

      The #1 most popular introduction to SEO, trusted by millions.

    • SEO Learning Center

      Broaden your knowledge with SEO resources for all skill levels.

    • On-Demand Webinars

      Learn modern SEO best practices from industry experts.

    • How-To Guides

      Step-by-step guides to search success from the authority on SEO.

    • Moz Academy

      Upskill and get certified with on-demand courses & certifications.

    • SEO Q&A

      Insights & discussions from an SEO community of 500,000+.

    Unlock flexible pricing & new endpoints
    Moz API

    Unlock flexible pricing & new endpoints

    Find your plan
  • Blog
  • Why Moz
    • Small Business Solutions

      Uncover insights to make smarter marketing decisions in less time.

    • Agency Solutions

      Earn & keep valuable clients with unparalleled data & insights.

    • Enterprise Solutions

      Gain a competitive edge in the ever-changing world of search.

    • The Moz Story

      Moz was the first & remains the most trusted SEO company.

    • Case Studies

      Explore how Moz drives ROI with a proven track record of success.

    • New Releases

      Get the scoop on the latest and greatest from Moz.

    Surface actionable competitive intel
    New Feature

    Surface actionable competitive intel

    Learn More
  • Log in
    • Moz Pro
    • Moz Local
    • Moz Local Dashboard
    • Moz API
    • Moz API Dashboard
    • Moz Academy
  • Avatar
    • Moz Home
    • Notifications
    • Account & Billing
    • Manage Users
    • Community Profile
    • My Q&A
    • My Videos
    • Log Out

The Moz Q&A Forum

  • Forum
  • Questions
  • Users
  • Ask the Community

Welcome to the Q&A Forum

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

  1. Home
  2. SEO Tactics
  3. Reporting & Analytics
  4. Setting up Google Analytics default URL

Moz Q&A is closed.

After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

Setting up Google Analytics default URL

Reporting & Analytics
3
7
14.0k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as question
Log in to reply
This topic has been deleted. Only users with question management privileges can see it.
  • CeCeBar
    CeCeBar last edited by Jan 18, 2012, 8:18 PM

    If someone has set:

    1. the default url in Google Analytics to a non-www address (http://mysite.com)

    2. then placed the UA tracking script from that GA account within the CMS framework of the website...

    3. ... and then set the permanent 301 redirect in the htaccess file to redirect to the www address (http://www.mysite.com).

    How less accurrate will my GA analytics measurements be considering the default url within GA is non-www and the permanent 301 redirect in htacess is to the www-address?

    Anyone know how reliable GA reports are until the default url in GA analytics is changed to match what is the redirected url in htaccess file?

    _Cindy

    1 Reply Last reply Reply Quote 0
    • CeCeBar
      CeCeBar @CeCeBar last edited by Jan 19, 2012, 4:17 PM Jan 19, 2012, 4:17 PM

      Got it, very helpful - thanks so much!

      _Cindy

      1 Reply Last reply Reply Quote 0
      • adrianvender1
        adrianvender1 @CeCeBar last edited by Jan 19, 2012, 3:52 PM Jan 19, 2012, 3:52 PM

        Hostname injection is when you add the hostname value to the beginning of the content URI.  Instead of seeing just '/index.html' in the content URI reports, you would see 'www.mysite.com/index.html'.  This is helpful when you are tracking across multiple subdomains and you need to tell the difference between files on your different subdomains.  You would see the following, as an example:

        www.mysite.com/index.html
        blog.mysite.com/index.html
        store.mysite.com/index.html

        3 different pages on different subdomains.  Without adding the hostname, they would have rolled up into a single '/index.html' line and it would be difficult to know which subdomains they are from.

        More info on setting up the filter can be found here:

        https://groups.google.com/a/googleproductforums.com/forum/#!category-topic/analytics/discuss-issues-related-to-your-accounts-reports-and-data/wEoiR4kQStQ

        1 Reply Last reply Reply Quote 0
        • CeCeBar
          CeCeBar @adrianvender1 last edited by Jan 19, 2012, 3:43 PM Jan 19, 2012, 3:43 PM

          OK, thank you.

          If I understand correctly, the tracking code for a single site did the work of tracking visitors, and the 301 redirect didn't change the tracking results -- even though the "301 redirected address" was at one time different from the "GA default url."

          If I may ask, what is a hostname injection? And if possible please explain a use case example where hostname injection is used.

          _Cindy

          adrianvender1 CeCeBar 2 Replies Last reply Jan 19, 2012, 4:17 PM Reply Quote 0
          • adrianvender1
            adrianvender1 last edited by Jan 19, 2012, 3:12 PM Jan 19, 2012, 3:12 PM

            The 'Default URL' field in a Property Settings screen will do a few different things:

            • Prefill a setDomainName value for your tracking code if you select tracking for multiple subdomains or domains.  I'm just noting in here, since none of what you described would be a cookie domain issue.
            • The Default URL would be would be prepended to the content URI when you are viewing content reports and click the icon to view the page in a new window.

            What I'll emphasize is that your Default URL value will have no effect on your data collection. It's simply not used in any data processing.  There are many use cases for having an empty Default URL, for example, if you are doing a hostname injection into your content URIs and you don't need another hostname prepended when you attempt to open a content URI in a new window, like I described in the 2nd option.

            Hope this helps.

            CeCeBar 1 Reply Last reply Jan 19, 2012, 3:43 PM Reply Quote 1
            • CeCeBar
              CeCeBar @RobMay last edited by Jan 19, 2012, 1:35 PM Jan 19, 2012, 1:35 PM

              Everything is consistent now - 301 redirect to www, default url in GA set to www.

              Tracking code has remained the same within cms because the GA account's url was changed to go to www.

              It is a matter of too many chefs in kitchen and no one had control of entire picture at one point.

              My question really is... when there was inconsistency in web address from 301 redirect (www-address) and the GA default url (non-www), why was GA still receiving traffic?

              And how much can one rely on older metrics when this inconsistency was in place?

              _Cindy

              1 Reply Last reply Reply Quote 0
              • RobMay
                RobMay last edited by Jan 19, 2012, 3:00 AM Jan 19, 2012, 2:59 AM

                Hi Cindy -

                Why would you set the default URL to non-www, and then set GA to track the WWW address? I think you should send all your traffic and tracking to one or the other. That's the first step in cleaning this up.

                I would suggest mapping everything to the www version as you have this set in for your 301. Sooner than later would be best to get accurate tracking started.

                oh - and fix the tracking code - to include the WWW version and not the non-www. That also needs fixing.

                Cheers, Rob

                CeCeBar 1 Reply Last reply Jan 19, 2012, 1:35 PM Reply Quote 0
                • 1 / 1
                1 out of 7
                • First post
                  1/7
                  Last post

                Got a burning SEO question?

                Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


                Start my free trial


                Browse Questions

                Explore more categories

                • Moz Tools

                  Chat with the community about the Moz tools.

                • SEO Tactics

                  Discuss the SEO process with fellow marketers

                • Community

                  Discuss industry events, jobs, and news!

                • Digital Marketing

                  Chat about tactics outside of SEO

                • Research & Trends

                  Dive into research and trends in the search industry.

                • Support

                  Connect on product support and feature requests.

                • See all categories

                Related Questions

                • ViviCa1

                  Attribution of conversions to payment gateway in Google Analytics

                  Hi all, We have been having a problem for a while now where most transactions are attributed to referrals from our payment gateway Sagepay. The issue started a couple of months ago, when we finally upgraded our website to https:// for logged in users and transactions. Before, when we were using http://, transactions were attributed to the correct channel. Even weirder, we upgraded 4 websites and only 2 of them have the issue now, the other two continue to attribute transactions correctly. I added Sagepay to the referral exclusion list which made no difference. Over the weekend, we upgraded to the global site tag and it seems to have improved somewhat, but yesterday 50% of transactions were still attributed to referral/sagepay. I am also seeing an odd issue, where for half of the transactions, the revenue and transaction are attributed to one channel, but the products (quantity) are attributed to another. One of the channels is always referral/sagepay and the other is the channel that the transaction should be attributed to. Has anyone seen this issue before? I'd appreciate any tips that might help us fix this issue. Thanks in advance!

                  Reporting & Analytics | Feb 21, 2018, 8:41 AM | ViviCa1
                  0
                • jayoliverwright

                  Google Analytics reporting traffic for 404 pages

                  Hi guys, Unique issue with google analytics reporting for one of our sites. GA is reporting sessions for 404 pages (landing pages, organic traffic) e.g. for this page: http://www.milkandlove.com.au/breastfeeding-dresses/index.php the page is currently a 404 page but GA (see screenshot) is reporting organic traffic (to the landing page). Does anyone know any reasons why this is happening? Cheers. http://www.milkandlove.com.au/breastfeeding-dresses/index.php GK0zDzj.jpg

                  Reporting & Analytics | Apr 4, 2016, 8:27 PM | jayoliverwright
                  2
                • geckonm

                  Tracking time spent on a section of a website in Google Analytics

                  Hi, I've been asked by a client to track time spent or number of pages visited on a specific section of their website using Google Analytics but can't see how to do this. For example, they have a "golf" section within their site and want to measure how many people either visit 5 page or more within the golf section or spend at least 6 minutes browsing the various golf section pages. Can anyone advise how if this can be done, and if so, how I go about it. Thanks

                  Reporting & Analytics | Dec 3, 2014, 12:44 PM | geckonm
                  0
                • DaveGuyMan

                  Is it possible to use Google Tag Manager to pass a user’s text input into a form field to Google analytics?

                  Hey Everyone, I finally figured out how to use auto event tracking with Google Tag Manager, but didn't get the data I wanted. I want to see what users are typing into the search field on my site (the URL structure of my site isn't set up properly to use GA's built-in site search tracking). So, I set up the form submit event tracking in Google Tag Manager and used the following as my event tracking parameters: Category: Search Action: Search Value When I test and look in Google Analytics I just see: "search" and "search value." I wanted to see the text that I searched on my site. Not just the Action and Category of the event.... Is what I'm trying to do even possible? Do I need to set up a different event tracking parameter? Thanks everyone!

                  Reporting & Analytics | Oct 13, 2014, 8:11 PM | DaveGuyMan
                  0
                • pwpaneuro

                  No Social Sources in Google Analytics - what am I doing wrong?

                  Hello Everyone, I'm having a strange issue: I DO NOT have in my Google Analytics the "Social" tab under the Traffic Sources category. Look at the first image of this post: http://marketingland.com/google-analytics-social-reports-8138 How do you "get" that to show? Hope somebody has this issue and can help, Thanks a lot, Alex

                  Reporting & Analytics | Apr 5, 2012, 5:24 AM | pwpaneuro
                  0
                • pwpaneuro

                  Custom Variables to track Vimeo plays on website with Google Analytics?

                  Hello Everyone, I'm trying to track how many times a Vimeo video is played on my site via GA. Does any of you have any knowledge of how can this be achieved? I've read the documentation and came up with this: After the iframe embed i insert this: Of course the GA is loaded in the header. Does not work, at least i cant see anything in analytics. I have set up the segment as per the attached image. Thanks in advance! Alex E6XnO.png

                  Reporting & Analytics | Aug 12, 2015, 10:45 PM | pwpaneuro
                  0
                • johnshearer

                  AW Stats vs Google Analytics

                  Hey Moz Community, I am looking to get opinions on the best practice for analytics/traffic analysis. From experience I know that AW Stats reads high and Google Analytics reads low for traffic for reason in this article http://www.smartz.com/blog/2009/01/23/analytic-confusion-%E2%80%93-awstats-vs-google-analytics/ It drives me a little nuts how far off both are for some pages.  I have one article that shows 100 views (GA) and AW stats shows 5 times that number of views. Any suggestions or systems you recommend? Thanks

                  Reporting & Analytics | Dec 6, 2011, 12:26 PM | johnshearer
                  0
                • kimwetter

                  Why are Seemingly Randomly Generated URLs Appearing as Errors in Google Webmaster Tools?

                  I've been confused by some URLs that are showing up as errors in our GWT account. They seem to just be randomly generated alphanumeric strings that Google is reporting as 404 errors. The pages do 404 because nothing ever existed there or was linked to. Here are some examples that are just off of our root domain: /JEzjLs2wBR0D6wILPy0RCkM/WFRnUK9JrDyRoVCnR8= /MevaBpcKoXnbHJpoTI5P42QPmQpjEPBlYffwY8Mc5I= /YAKM15iU846X/ymikGEPsdq 26PUoIYSwfb8 FBh34= I haven't been able to track down these character strings in any internet index or anywhere in our source code so I have no idea why Google is reporting them. We've been pretty vigilant lately about duplicate content and thin content issues and my concern is that there are an unspecified number of urls like this that Google thinks exist but don't really. Has anyone else seen GWT reporting errors like this for their site? Does anyone have any clue why Google would report them as errors?

                  Reporting & Analytics | Sep 6, 2011, 2:12 PM | kimwetter
                  0

                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
                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 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                • Accessibility
                • Terms of Use
                • Privacy

                Looks like your connection to Moz was lost, please wait while we try to reconnect.