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
-
MOZ Freshweb reported mentions that really does not contain any mention - anyone else experiencing this?
MOZ Freshweb reported links from "traffic.fullcontentrss.com" that doesn't really contain any mention. Is this a MOZ error or is it maybe since fullcontentrss.com has a javascript that pulls data into their own RSS, MOZ ended up crawling partially and as a result not reporting the correct URL? Anyone else experiencing this anomaly?
Moz Bar | | CPR_PTANTONO0 -
Canonical in Moz crawl report
I'm wondering if the moz bot is seeing my rel="canonical" on my pages. There are 2 notices that are bothering me: Overly Dynamic URL Rel Canonical Overly Dynamic URL - This notice is being generated by urls with query strings. On the main page I have the rel="canonical" tag in the header. So every page with the query string has the canonical tag that points to the page that should be indexed. So my question...Why the notice? Isn't this being handled properly with the canonical tag? I know I can use my robots.txt or the tool in Google search console but is it really necessary when I have the canonical on every page? Here is one of the links that has the "Overly Dynamic URL" notice, as you can see the the canonical in the header points to the page without the query string: https://www.vistex.com/services/training/traditional-classroom/registration-form/?values=true&course-title=DMP101 – Data Maintenance Pricing – Business Processes&date=March 14, 2016 Rel Canonical - Every page in my report has this notice "Using rel=canonical suggests to search engines which URL should be seen as canonical". I'm using the rel="canonical" tag on all of my pages by default. Is the report suggesting that I don't do this? Or is it suggesting that I should? Again...why the notice?
Moz Bar | | Brando160 -
How is Moz's DA score so high?
Obviously they make the tool that measures this, but is their own score inflated because of this? I know DA isn't strictly a measure of popularity, but Moz's own score seems a little _too _high compared to some other sites... 92 - Moz.com 90 - Salesforce.com 87 - Airbnb.com 84 - Priceline.com 83 - Squarespace.com Can someone shed some light on how DA is actually measured?
Moz Bar | | WickVideo0 -
I update content and then craw but the MOZ spider still shows old content. Do I need to update something else?
"This shows but was replaced a day before I ran Moz crawer: | We provide a full service for low cost automated phone calls, robocalls, Bulk SMS service, Political robo calls without needing computer skills | "
Moz Bar | | ThomasDaBomb
I look in the link on website and see:
<title>Our customers talk about: Currently the tremendous growth of organi</title> Why does the craw not reflect the current content? Thanks.
Thomas0 -
Duplicate Home Page in Moz Report
I recently ran a crawl report in MOZ for www.laddersfree.co.uk and it has picked duplicate pages for my home page. The two pages are www.laddersfree.co.uk and www.laddersfree.co.uk The CMS System my developer is using is Concrete5. If you look at the source code there is a Canonical <link rel="<a class="attribute-value">canonical</a>" href="http://www.laddersfree.co.uk/" /> I am very confused as to why there are two pages picked up in the crawl. Can someone offer any advice please? Thank you. Jason
Moz Bar | | gymmad0 -
My product pages have no weight / links from root domains with the Moz tool bar
Hi, When I view my home page (http://www.arkwildlife.co.uk) with the Moz toolbar, I see a good PA and a good amount of links from root domains. As I go down the site, it seems to get worse. The category pages (http://www.arkwildlife.co.uk/Category/0/Straight_Foods.html) have a little but not much and then from this point onwards, it's nothing. The product page (http://www.arkwildlife.co.uk/Item/Straight_Foods~Sunflower_Seeds/SUNH/Premium_Sunflower_Hearts.html) is reporting to have no root domain links but I am not sure why. Interestingly, when I click through to a review page (http://www.arkwildlife.co.uk/StockReview/0/SUNH/0/Premium_Sunflower_Hearts.html) it does have some juice. Would anyone be able help on why this is happening and what I need to be looking at in order to resolve it please? EDIT: I've been looking at the hyperlinks and notice something odd. If I review the score with the first link below, it gives a score of 1, but the second gives a PA of 13 with one root domain linked. 1:http://www.arkwildlife.co.uk/Item/Straight_Foods~Sunflower_Seeds/SUNH/Premium_Sunflower_Hearts.html 2:http://www.arkwildlife.co.uk/Item/Straight_Foods%7ESunflower_Seeds/SUNH/Premium_Sunflower_Hearts.html Please note the "%7E" instead of the "~" in the URL. The browser appears to show the ~ character no matter what but the rank of the page changes. I don't understand what the Moz toolbar is doing with this. Note: This behaviour only happens in Mozilla Firefox, in chrome both the rankings are zero for each URL. Many Thanks.
Moz Bar | | nawgie0 -
Moz Local | Download Template
Dear Moz I've received your email about Moz Local. A fantastic tool but it does not allow you to download a template. Clicking 'Download this template' simply reloads the page. I am testing it under incognito mode of Chrome with no add-ons Thank you!
Moz Bar | | Bio-RadAbs0 -
Moz "Crawl Diagnostics" doesn't respect robots.txt
Hello, I've just had a new website crawled by the Moz bot. It's come back with thousands of errors saying things like: Duplicate content Overly dynamic URLs Duplicate Page Titles The duplicate content & URLs it's found are all blocked in the robots.txt so why am I seeing these errors?
Moz Bar | | Vitalized
Here's an example of some of the robots.txt that blocks things like dynamic URLs and directories (which Moz bot ignored): Disallow: /?mode=
Disallow: /?limit=
Disallow: /?dir=
Disallow: /?p=*&
Disallow: /?SID=
Disallow: /reviews/
Disallow: /home/ Many thanks for any info on this issue.0