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
-
I have 3 domains with deffrent TLD and convert them to .com domaim why spam score show 9/17 for them
My other domains (.net - .org) was redirect by 301 redirection domain.net domain.org redirect to domain.com then i show 9/17 flag spam score please if there any problems just tell me . my website: arabbus.com xnnnTCj.png
Moz Bar | | mahmoudsamy3600 -
Can we access previous weeks/months key word analytic stats?
We're missing some data for our key word positioning from November and December of last year and I am looking to see if I can access this still? I realise i can access the previous weeks stats and also a month as a whole but is it possible to access previous weeks or months and how can i go about doing this? Thank you!
Moz Bar | | collection_260 -
500 errors showing up differently on moz and google wmt
Lately, I've been having the issue of a large increase in 500 errors. These errors seem to be intermittent, in other words, Google and Moz are showing that I have server 500 errors for many pages but, when I actually check the links, everything's fine. I've run tests to see if there is any virus on the server or if I have any corrupt files and as far as I can tell, there are none. I'm left with the possibility that maybe one of my plugins is causing this issue (I'm built on top of Wordpress). Moz is showing that I had nearly five hundred 500 server errors on the 12th or the 11th. On the other hand, Google shows that on the 13th I had 179 server errors and then an additional 200 for the 15th. I'm assuming Google is slow to find or report these things? I would like to know which is more reliable so that I can try to figure out which of these plugins may be causing the problem, if any or if I'm investigating this the wrong way, I'd love to have more suggestions. Thanks in advance! Sorry, the url is http://www.heartspm.com if you'd like to take a look.
Moz Bar | | GerryWeitz0 -
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 -
Competition tracking
Hello when I added my website, I was asked to add competition website and brand name, where can I track this now?? Or If i cant track it, why was I asked to put it and how can it help? Sorry for asking, I use tablet at the moment and I just can't find it. Thank you, matt
Moz Bar | | Faild0 -
Issues adding keywords to MOZ analytics
Hi All 🙂 I've started a couple of campaigns in MOZ Analytics, one accepts keywords the other looks like it does but doesn't actually add them.. I'm pasting a group of keywords, about 30, all separated with comma's. Doing exactly the same to one account that congratulated me straight away and added them to the list below, yay! The other shows the spinning wheel for a few seconds and does nothing further, I've waited a good 24 hours and they keywords have not appeared. Any help appreciated! Thanks 🙂
Moz Bar | | spanda0 -
What is the best tool to track US positions from the UK?
We are currently tracking the rankings of a US-based client (we are UK-based) and it appears we are seeing some considerable differences in positions. To check ranks we often use Fat Rank which can be set to a US-based search and a manual search on Google.com. However, our American client is receiving different results (actually higher positions than we have recorded!) and is claiming to have used both a manual check on Google.com and the following tool.
Moz Bar | | Webrevolve
http://smallseotools.com/keyword-position/ Would anybody be able to tell me how accurate this tool is regarding US-based positions?
We’ve since made use of the tool too and it adheres to the rankings that the US-based client is claiming – rather than our checks using Fat Rank and Google.com.0 -
Moz Analytics Campaign Dropdown , does not work
I have 2 campaigns and when I go to http://moz.com/pro/home but they don't show up on http://analyti/pro/home and the dropdown selector does not work in there 😞 HVjQ7eI.png
Moz Bar | | Saijo.George0