GA snippets for subdomains and best tracking in MOZ
-
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
-
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.
-
Thanks so much Dana, that's exactly what I needed. L--
-
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
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
-
Does "Disallow: /xmlrpc.php" in robots.txt affect moz tools ability to fetch DA?
Just checked a website for Domain Authority using Moz' tool, however it returned 1 for DA, which should be unlikely. I have been trying to find the problem and found "Disallow: /xmlrpc.php" in robots.txt. Could this affect Moz' tools ability to get the required data?
Moz Bar | | Foli0 -
In the Moz Site Crawl, what does "External Links" mean?
I thought I knew what it meant but am finding instances where the value in the column, "Linking Root Domains" is greater than the value in the column, "External Links?" Thanks!
Moz Bar | | Edward_Sturm1 -
Moz Forum Responses Crashing Outlook 365
Don't know if anyone else has this issue every time I get a forum response email and I try to open it it seizes up Outlook 365. It totally crashes, all I can do is to kill the process and restart Outlook!!
Moz Bar | | seoman100 -
Tracking Across 3 Sub-directories on the Same Domain in Google Analytics
Hello everyone, I'm trying to track 3 sub-directories on the same domain. http://domain.com/1/http://domain.com/2/
Moz Bar | | vndflkvnlkzdfnv
http://domain.com/3/ Could someone help confirm this is the correct code for GA? var pageTracker = _gat._getTracker("UA-12345-1"); pageTracker.**_setCookiePath**("/1/"); pageTracker._trackPageview(); pageTracker.**_cookiePathCopy**("/2/"); pageTracker._trackPageview(); pageTracker.**_cookiePathCopy**("/3/"); Thanks in advance.0 -
Moz crawl issues: All pages keep resolving to our "cookies not enabled" page
Upon running the Moz Pro site crawler, I noticed that I received quite a bit of duplicate titles along with 302 redirects (which is our site creating a temporary 302 to our "cookies not enabled" page). How would I get around the crawler being redirected to this page? I've never ran across this issue before, despite using the crawler with sites that use the same framework as the one thats affected. Any ideas?
Moz Bar | | responsivelabs0 -
Are MOZ Analytics dashboards available for other timeframes than the week just gone?
Hi Guys, We're wondering if anyone knows if there is a way to get moz analytics dashboard reports for timeframes other than just the last week? When we view the dashboard report, under the heading there is a 'timeframe' dropdown, however it only ever shows us the previous week as an option. Would be great if anyone knows if this is available now / soon? Cheers, Camille@Trilogy
Moz Bar | | Trilogy1 -
Given that I am currently using a bot sniffer...How can I identify the MOZ bot in order to whitelist it?
MOZ is currently blocked from crawling my sites because I use a bot sniffer. Does anyone know how I can properly identify the MOZ bot in order to whitelist it? MOZ is using Amazon web services and thus employs thousands of dynamic IPs to crawl.
Moz Bar | | Felix_LLC0 -
Duplicate Page Content Report on MOZ
Hi, I am just wondering as to the accuracy of this report - does it pick up all the duplicate on page content? Or is there a limit? We have an ecommerce store with a lot of copied and pasted descriptions - just wondering if there is a limit on how much the moz crawler picks up? In other words, once we fix what MOZ has detected, will there be more detected because it is limited to display say up to 200?? Hope you understand what I mean. Thanks
Moz Bar | | bjs20100