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/
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.
-
You do not need to use any special code like that, all you need to do is make sure that the basic Google Analytics code is located on all pages on your site. The one thing I do recommend doing is updating to use Google's newest tracking code, which should look like this:
-
GA should naturally track any sub-directories on the same domain without added code. What exactly are you trying to accomplish?
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 my Domain Authority is Drop from 36 to 29?
Hello, I need to know why my website domain authority Drop from 36 to 29 Domain Authority for my this domain http://latesthairstylez.com was 36 and it is drop to 29 in with in one day . Though i have a very decent and good links going over to all my pages my DA is affected and decreased. and my all links are showing in moz how i can find the solution ...? which links are disturbing or coz of doping Domain authority ....? or how to find the reason of Droping DA
Moz Bar | | hangnga0 -
Strange insight "tracked keywords" from Moz
Hi there, I was wondering if somebody is seeying the same problem. Since a couple of days i got a new keyword insights in my mail and i've seen some strange things for two accounts. The branded keywords are dropped lower then position 51. The thing is that i got an insight, i checked it in my private mode and the branded keywords are still there. Other keywords are still ranking, and there is no effect on my traffic. There is no connection between the sites. One has a couple of links and the other a lot. One has a very good page with nice optimalisation and the other has no text. So it couldn't be over-optimalisation and incoming links...
Moz Bar | | NielsVos
Does anybody have the same problem? Greetings,
Niels0 -
Is the Moz on-page grader going to start grading mobile-first as Google does?
I wonder whether this has been taken into account yet or there are any plans to in future.
Moz Bar | | mybuilder1 -
What's the best way to track broad search terms?
I'm finding out that Moz only tracks exact match results for key terms. Does anyone know of a good tool for tracking broad search terms? So for example: keyword1 keyword2 keyword3 as opposed to "keyword1 keyword2 keyword3"? Any help is appreciated!
Moz Bar | | controlyours
Thanks! -David0 -
Is it normal for my homepage's page authority to be higher than my domain authority?
Hi everyone, I've just been checking my MOZ authority scores, and the page authority of my home page, www.concerthotels.com is 53 (mozRank of 6.16) which seems pretty good to me. However, the domain authority is only showing as 45. Is this typical? There is such a big difference between these two scores - what does that suggest? Is there anything obvious that I can do to bring the domain authority up to the level of authority that the homepage commands? Similarly, the UK version of my site has a homepage authority of 41, but the domain authority is only 30. Looking at numerous other websites, quite often the homepage and domain authority scores are very similar, or the domain authority is slightly higher, so it does look as if this is unusual. Any comments would be greatly appreciated, Many thanks Mike
Moz Bar | | mjk260 -
Moz analytics not updating
Okay so I was invited to moz analytics. When I received the email I was stoked to get to use the new beta software. My campaigns transferred over ,but when I began to look at the data, it said updating check back in 24 hours or something along those lines. I thought okay that is fine, but to my suprise it has been around four days since then and it still says it is updating. It also shows weekly stats of visits but the number there is definitely wrong. It said I only had around 2,100 but I get more than that daily. Anyone in support that can help? I'm confused on what I can do to fix this issue. I understand it is just a beta ,but other people, from what I have seen, haven't had a similar issue. If anyone can point me in the right direction I'd appreciate it!
Moz Bar | | ithvac0 -
Why do my top linking domains according to Webmaster tools, not even appear in my OSE report?
I know the Google index is obviously a lot larger than the MOZ index...but.... I have 8,000 links from blogspot.com according to Webmaster tools, and just one link according to OSE I have 600 links from an online dictionary according to Webmaster tools, not one is mentioned in my OSE report. I'd go so far as to say most of my top 10 linking domains according to Webmaster Tools, don't even have a single mention in my OSE report. We've been hit hard by Penguin 2.0 and I want to look at our link profile.....it seems OSE may be great for looking at my competitors link profiles, but for my own site it seems to be, well, not very accurate at all! So from a trying to do undo the damage caused by Penguin 2.0 point of view, should I just use webmaster tools and forget about OSE? Thanks!
Moz Bar | | MarbellaSurferDude0 -
Link Metrics API: sort by domain authority not working?
I’m trying to make calls to the Link Metrics API (via the Linkscape gem); queries that set sorting to :page_authority work, but queries that set it to :domain_authority return Unrecognized API method: 'links/page_to_domain.domain_authority' Unrecognized API method: 'links/page_to_page.domain_authority' Meanwhile, Open Site Explorer happily sorts by domain authority. How should I query the Link Metrics API to get results sorted by domain authority?
Moz Bar | | ginzametrics1