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
-
Why page load time is different in google webmaster vs what is displayed in moz?
When I analyze the site through Moz tool and compare the results with google webmaster, I am not able to figure what why Moz does not report the slow pages. Fro example this page has an avrage LCP of 3.0 sec https://www.collegehippo.com/graduate-school/programs/gre-score-business-analytics-data-analytics When I see the report in moz, it does not point to any such issue. Should I be worried about what google reports and try to fix the page?
Moz Bar | | etattva0 -
In Moz Campaigns, how are competitor domains tracked if they redirect their site?
Hello! One of our competitors (Company A) that we've tracked in Moz for a long time recently merged with another company (Company B) and redirected their whole site to Company B's site. Will our competitor tracking still work as-is? Or do we need to make an adjustment? I'm reluctant to delete Company A from our competitor tracking, because we will lose all of that data. But if all of the keywords are slowly going to drop off as Google starts showing Company B results only, it may be the only option. Any help is appreciated! Thanks!
Moz Bar | | PrimeFoodTeam0 -
Can I retrieve city based keywords from Moz Keyword Explorer?
I was trying to take keywords based on cities, but could not find an option to set the city based target. Please help!
Moz Bar | | S-A-Marketing1 -
Incorrect country flag renders in Moz Bar. Why and how do I remove it?
The Moz Bar displays a german flag un front of the URL in On-Page elements and lists Germany as the Country location in General attributes. Why is this, and how do i change it?
Moz Bar | | eocreative0 -
Site Crawl - MOz Pro
Hi There, When i look into my site crawl i have thousands of duplicate content issues. Now they are essentially product pages which are in multiple categories - however we have added the canonical tag so im confused as to why all of these are appearing as if there is an error, does the MOZ bot not take canonicals into account? Kind Regards Gemma
Moz Bar | | acsilver0 -
Moz Bar not providing any data. Tried logging out/back in and un/re-installing, but no dice.
Used Mozbar for a long time, and normally works fine. Suddenly finding that it is not providing any data. All of the fields are there, but it does not provide me with PA/DA, etc, and all social metrics are at 0. This is across all sites, not just on in particular. Have tried logging out and in, deactivating and activating, and reinstalling. Nothing has worked.
Moz Bar | | SearchPros2 -
Tracking a domain with multiple locations
Esteemed Marketers of the Moz community, We'd like to track a domain that has a separate web presence for specific locations. In other words, the business has multiple locations in NJ and one in NYC. Any tips and tricks to track how we're doing in the rankings for both NJ and NY? Thanks Much, Paul
Moz Bar | | brainrainmedia1 -
404 Crawl Diagnostics Report MOZ
Hi, I keep getting 404's appear in the Crawl Diagnostic error warnings. How do I find out which pages are linking to these 404 pages? How is MOZ finding them? thanks Ben
Moz Bar | | bjs20100