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
-
Data Analysis Tool - No data found for this domain
For some reason, about a week ago, my clients website nolonger appears on the moz analysis tool ( www.movietrailersarea.org ) which it previously was. now i get the error "Bummer! No data found for this domain" and now nearly all traffic has also depleted.
Moz Bar | | Mike569
site is still indexed by google & robots isnt blocking any crawlers.
any idea?3 -
Google ranking by keyword for website
Hi, i am wondering if there is a function to check page ranking on google for a specific keyword/s for our website using MOZ. Thanks
Moz Bar | | andrewlos0 -
Domain Authority vs Actual Results?
Hi. I know that MOZ's domain authority (DA) is an industry authority when it comes to evaluating the quality of a website. However, I've encountered something interesting in regards to a specific site: Digital Journal If you examine in through OSE you'd notice it has amazingly high DA - 83. But when you look at it through SEMRush you'd see that it is steadily dropping in rankings and accordingly traffic (lost 93% of traffic over the last year) which makes me believe that it got penalized. Shouldn't it be reflected on MOZ's analysis?
Moz Bar | | BeytzNet
Is it a site I should worry that points to me? This is an addition...
I encountered also the following site: americanchronicle.com which has the DA of 61 (pretty high) and is actually down for a while now Thanks0 -
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 -
Does anyone else have issues with Moz's keyword search volume tool for Google's search engine?
It will show the search volume for Bing even when Google is selected. Then, if you select Bing, you'll get the same data as it shows for when you selected "google". So basically, this tool does not work for Google's search engine. Or it is most likely not a reliable way to perform keyword research. Anyone else notice this? Does Moz even offer a way to submit a support ticket to get this fixed?
Moz Bar | | ShokIdeaGroup1 -
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 -
Bing search match vs google
With the keyword research on moz it reports on bing search volume - does anyone know if you should multiply this for google searches - ie if I'm looking at a keyword with 2500 bing searches what should I be considering google would be?
Moz Bar | | Wickedwildweb0