Setting up Google Analytics default URL
-
If someone has set:
-
the default url in Google Analytics to a non-www address (http://mysite.com)
-
then placed the UA tracking script from that GA account within the CMS framework of the website...
-
... 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
-
-
Got it, very helpful - thanks so much!
_Cindy
-
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.html3 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:
-
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
-
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.
-
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
-
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
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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.
Related Questions
-
Which one should I use...Google Analytics or AFS Analytics
Hi There, I am about to implement analytics for a customer site and I am wondering if I should use Google Analytics or https://www.afsanalytics.com ? I am leaning towards Google since it's pretty mainstream but I would love some feedback on the AFS ! Thanks everyone! Gary
Reporting & Analytics | | gdavey0 -
Conflicting numbers in Google Analytics
I am getting 2 completely different numbers in Google Analytics.According to the graph on my Dashboard organic traffic decreased ~40% comparing June 7 -> June 6.However, when I dig a bit deeper and look at the 2 dates specifically compared to each other I get a `3% increase in traffic.When I look at the traffic on just June 7, I get the number indicating the increase.Any ideas or someone getting similar conflicting numbers??
Reporting & Analytics | | theLotter0 -
Google Webmaster Preferred Domain Settings Help
I was recently running my SEO Moz report for my domain and saw a drastic drop in page rankings on the report. After some trouble shooting, I checked my Google Webmaster Tools and saw the "Preferred Domain for my Site has changed" the last week in which I saw the drastic drop. Under the "preferred domain" area, I have it set to www.marware.com but on most of the links to my site, it reads www.marware.com/ . We also have http://marware.com , but am not sure if this carries any relevance as the preferred domain is set for www.marware.com . Does the "/" make a difference in the "Preferred Domain" section? If so, how do I update it? Is there a way to confirm it is set up correctly? In the photo attached, what does "Linked Property" "Analytics Web Property" and "Associated Webmaster Tools Site" mean? Thanks in advance! T5tSCxm
Reporting & Analytics | | Khadaran0 -
How to track what people type on my text boxes on Google Analytics?
Hi there! In our website, we have a few text boxes that users need to use to complete the goal. The boxes aren't search boxes, but it's still important to us to track what people type on it. I'm looking for a way to track the data through the "event" feature in Google Analytics, but it seems that this tracker can only calculate clicks, or video views etc. Does anyone knows how to track do it?
Reporting & Analytics | | ivan.precisodisso0 -
Why is Webmaster Tools not Linking Correctly Google Analytics?
I have a global site with .com as the US site and then /country for all other markets i.e. .com/uk .com/de etc. Each site has it's own WMT profile. Each site has it's own GA profile. Since Google added Search Engine Optimization to the GA interface, I can't track these sites separately under this new feature. It seems to me that it can only be associated with a single WMT profile at a time or rather that WMT can only be associated with a single GA profile at a time. The numbers for the UK and US site are identical, but when I try and link the UK WMT account with GA it removes it from the US profile and vice versa.
Reporting & Analytics | | Red_Mud_Rookie0 -
Google analytics tracking
Is their a built-in or easy way to track the amount of times an exit link is clicked on a page and show that with other links of the page. For instance: I had a page with several external ad links on it and I want to track how many each got and rank them in google analytics
Reporting & Analytics | | insitegoogle0 -
Google Analytics: how many visits from country Google domains?
Hello, I manage a site with visitors from many different countries. With Google Analytics, it is normal to see the number of visitors from each search engine. However, I would like to identify the number of visitors from each Google-search contry domain. How many visitors from Google.com? How many from Google.co.uk. And from Google.co.zm? And so on. Anybody knows if this is possible and if yes, how can it be done? Thank you in advance, Dario
Reporting & Analytics | | Darioz0 -
How to measure number of visits from Google News coming from Google Universal Search (NOT referral coming directly coming from news.google.com) with google analyitcs
I'm running a news site, and I have a problem of accuratly measuring which traffic is REALLY coming from google news. I analyzed a lot of individual articles and I come to the conclusion, that the visits, that come from the google news section in the universal search results are counted as "normal" search engine traffic in google analytics. So if you do a Google search for a topic that includes links from Google news, you don't get an accurate referral count. As an example, if you do a search for "eBay", incorporated into the page 1 search results you may also see Google news results as well.
Reporting & Analytics | | Mulle
If someone clicks on that Google news link that appears in Google search, it shows up in Google analytics as a referral from Google search, when it was actually from a Google news referral. I was already checking google analytics and google news help forums and searched SEO blogs for this. But I wasn't able to find a working solution. Can anybody help me out with this problem? Thanks so much, Matthias0