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
-
How To Stop Google's "Fetch & Render" From Showing Up In Google Analytics
Hi all, Within Google's "Fetch & Render" (found in Google Search Console) is the ability to index certain pages from my website on-demand. Unfortunately, every time I ask Google to index a page, it registers as a bounce in Google Analytics. Also, if it means anything, my website (www.knowtro.com) is a single-page application, functioning similarly to Google. If you guys know of any solution to this problem, please help! I originally thought that Google would know to block its own Fetch & Render crawler from Google Analytics but that doesn't seem to be the case. Thanks, Austin
Reporting & Analytics | | A_Krauss0 -
Google Analytics Question - Impressions & Queries Up, Sessions Down
I'm working with a client who, according to the Google Query report, impressions and sessions are up since we've started work with them about 6 months ago, but Google sessions are down. In moz, we're seeing a gradual, but steady increase in search visibility specifically with Google. Note: this is all organic. From when we started tracking queries, the first month we were tracking there were 43,581 impressions and 690 click throughs for the month. This past month there were 98,293 queries and 1015 clicks throughs for the month (granted not year over year data) - of these 1,015 clicks, 995 of them were from web. However, for those same time periods, sessions from Google are down over 30% - 1,750 vs. 1,189. I'm not sure how to interpret this. I realize that clicks and sessions are not a straightforward comparison, but I would think that if clicks were up according to the query report that sessions would also be up. Is it that some of these clicks are bouncing and therefore not being tracked as a session? Is there a potential issue with how data is being tracked?
Reporting & Analytics | | Corporate_Communications0 -
Can you track two Google Analytics Accounts on one site?
If you have a site that had an old analytics account and then implemented a new one is it possible to run tracking code that records to both accounts without causing your site or data issues? We are doing this so we don't loose data at any point - ideally it wouldn't have been split between the two but making one redundant isn't an option. Ideally we would have merged the data from both accounts and had one - however the research we have done points to this not being a possibility - unless one of you guys knows different? It would be great if anyone has experience on any this.. Thanks
Reporting & Analytics | | ChrisAllbones0 -
Editing "Goal Sets" for Goals in Analytics
I set up 8 goals in analytics and Google seems to have auto placed them into their own Goal sets (first 5 = Goal Set 1, last 3 are Goal Set 2). http://awesomescreenshot.com/05134f1tad Any idea how to edit and group these up myself?
Reporting & Analytics | | OlegKorneitchouk0 -
How do I manually add transactions to Google Analytics
We are seeing Google Analytic's drop transaction on our site so therefore all the figures are skewed. Is there a way I can manually add transactions to GA to cover the missing one?
Reporting & Analytics | | Towelsrus0 -
Advanced segements Google Analytics
Hi guys, I was to hasty last time marking the given question as answered. So i would like to ask another question on the subject. My original question was how to get a pdf report of 10 specific keywords with information about visits,pages per view. avg, visit time, new visitors and bounce rate. The answer was to create an advanced segment with "or operators" and adding all keywords on an exact match basis. I did this but it still gives me a list of more then 500 keywords in traffic sources organic view. Next to that i get different visitor numbers for some keywords where it says 40 at the normal segments (all visits) but gives me 0 when i turn on the advanced segment. I've been clicking and changing things for a long time until i got almost dizzy. Could someone plz help?
Reporting & Analytics | | 5MMedia0 -
Alternative to Google Analytics
Hi from sunny Manchester! I'm looking for recommendations for alternatives to GA. I'm specifically looking for something which won't sample data and will give us accurate numbers. Our site is pretty big, it receives 6 million+ visits and 50 million+ pageviews/year. Any recommendations would be greatly received together with any good/bad experiences you've had with them. Thanks in advance, Brendan.
Reporting & Analytics | | Confetti_Wedding0 -
Looking for a Google Analytics expert
Looking to hire a Google Analytics expert for a project. Dealing with trying to track traffic across multiple domains and then work with the Ecommerce options. Contact Jeff Logan @ Avelient with costs and time frame for work. [personal information removed by editors. please contact via private message system to exchange information]
Reporting & Analytics | | Avelient0