Google Analytics to sub domains
-
Hi,
I have a site xyz.com and two separate sites on sub domains xyz.com/abc and xyz.com/def. What's the best way to go about with GA such that I can get all the data in the same place.
Should I use the GA code for xyz.com on sub domains as well? Or should I create separate profiles?
-
Firstly, I would like to correct a mistake I did when posting the questions. The two sites are hosted as subdirectories and not sub domains.
Here's how I solved the issue.:
1. Created two new views for each subdirectory abc and def. Added filters to get specific data for each site.
2. So, now I had three views - The Master View that contains all the data. ABC view - that contains data only for xyz.com/abc and DEF view that contains data only for xyz.com/def. Problem solved.
There were some good points, like defining internal traffic to GA, for subdomains. I believe, it wasn't necessary for subdirectory set up.
I realized that I could have created another view just to have data fro XYZ.com; filter data from both sub-directories.
-
HI Mayank,
You can do either depending on how you want to view the data. There was a good blog post a few months back on the way to approach various setups, check it out here. Separate account profiles is the easiest way to set it up, but of course the data will all be separated also. If you decide to use the same GA code for all the subdomains then you will likely want to do some tweaking to ignore self referrals and filter the data to show the subdomain string in your content reports. If you set up filters I would suggest to do it using views to not alter your original data - you can check out a rundown on how that can be setup here.
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
-
Modify Google Analytics Script To Only Cookie U.S. Sessions
I know I can filter sessions from outside the US, but is there a way to modify the GA script so that it doesn't cookie visitors to a site if they are from outside the US? Note, this is separate from having a cookie consent opt-in. Thanks in advance,
Reporting & Analytics | | FitzSWC
Fitz0 -
"Display" referrals on google analytics
We have just had 200+ visits on the 'Display' channel within 5 minutes - these referrals are from all over the world and this is very out the ordinary for our business - should we be concerned? 9cHllwW
Reporting & Analytics | | RayflexGroup0 -
How drop off works in google analytic for enhance ecommerce?
Hello Guys, I have implemented enhance ecommerce ( i.e. - https://developers.google.com/tag-manager/enhanced-ecommerce ) Now i have query how drops off actually works? Like i visited the my site, then product page then checkout step 1 page after that i close the checkout step 1 page that means checkout step 1 drop off will appear in google analytic? right? John
Reporting & Analytics | | varo0 -
How to find goo.gl/ URLs in Google Analytics
Hello! How does one go about finding the impact of goo.gl/ shortened URLs in Google Analytics? (I know I should be using Campaigns, but this was for an old project.) Thanks in advance! Erik
Reporting & Analytics | | SmileMoreSEO0 -
Excluding referral traffic from a specific page Google analytics
Hi, I am trying to exclude from referrals from a particular page i.e. www.domain.com/nothispage within Google analytics, I have tried a couple variations within the advanced filter (Regex etc) section without much luck, could anyone assist ? Updated-trying to do this using a filter for the entire profile. Thanks Marc
Reporting & Analytics | | NRMA0 -
Google Analytics Custom Filter
Hello, Quick question, when I create a custom filter on a profile that already has data collected will that filter apply to already collected data or will the filter only apply from the day it was created? Am doing a custom exclude IP filter. Much thanks,
Reporting & Analytics | | Unity
Davinia0 -
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 | | johnshearer0 -
Setting up Goals in Google Analytics that involve a 3rd party site
I've set up several goals for one of my clients in Google Analytics. The ones that relate to things on the site -- such as clicking on the "Contact Us" button -- work just fine. However, I set up one that is tracking when someone clicks on a purchase button, which sends the user to a third party site (PayPal). This one doesn't seem to work. (I purchased and item and the goal was not recorded). Looking to see if I have to do anything different when setting up the goal.
Reporting & Analytics | | EricVallee340