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
-
Domain Analysis Limit
Hello, even though we are a Moz Pro user we have a 'part-timer' who keeps the client metrics scoreboard up to date. Rather than have him running wild in Moz Pro we bookmarked the 'Domain Analysis' page and he knows that only 3 can be reported on per day. If it was an immediate need then we would use Moz-Pro. The issue was reported to me that he is receiving 'Search Limit reached' and do a moz-pro trial. So, has the 3 per day limit been changed? Thanks, Dave
Moz Bar | | 7thPowerInc0 -
Domain authority for .melbourne
Hi there, We have been working on http://www.roofrestoration.melbourne/ for over 2 years now and the domain authority has not moved at all. Is this an issue with the .melbourne domain or is there a more underlining issue? Thanks for the help! Joel
Moz Bar | | JoelMolloy0 -
Google Analytics Constantly Failing to Integrate
I am receiving this error daily. What's the story? There was a problem with your Google Analytics connection on one or more of your campaigns. View your campaigns to reconnect Google Analytics and view traffic metrics.
Moz Bar | | LegendaryLionWebDesign0 -
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 -
Connect to Google Analytics problem (Moz Analytics)
Hello - I recently received the Beta invite to Moz Analytics (very excited). I set up the campaign for our primary site and entered our Google Analytics profile - however, Moz does not seem to accept the profile when I click the "Save" button. All of our profiles are listed w/in the drop-down menu, but after selecting the profile we wish to link/connect to - nothing happens. So we're not receiving any stats w/in Moz from our GA acct. Please help. I'm really anxious to begin delving into Moz Analytics! Thanks
Moz Bar | | ryankish0 -
New moz analytics...will it have reporting?
Loving the new Moz Analytics...very shiny. Just wondering if it will have reporting tied to it at some point? Thanks..Jeannie x.
Moz Bar | | Jeannie.0 -
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 -
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://analytics.moz.com/pro/home and the dropdown selector does not work in there 😞 HVjQ7eI.png
Moz Bar | | Saijo.George0