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?
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 -
What do you do when there is significant movement when checking a Ranking & Algorithm tracking tool?
I've checked various Ranking & Algorithm tracking tools (SEMrush, Mozcast etc.) and since 12th Jan 18 there has been a lot of 'turbulence' in terms predicted Google algorithm changes. This has been 'high' for the past 2 weeks. Question is, would you 'hang tight and ride the wave' or 'act fast'? Our actual rankings haven't really been affected positively or negatively - so I'm thinking I should just ride the wave to see what happens but keep a close eye on the rankings?
Moz Bar | | Jack_Jahan1 -
Why there is a big gap between MOZ and Google Analytics Keyword Ranking for my website?
Hello everyone, I've just started a SEO project and I'm very new in the field. Well, I tried to select the most interesting Keywords for my website. When I checked out what the current ranking for each one was, I noticed that between Google and MOZ, figures are totally different. For example, for the word "channel manager": on Google Analytics: #2 on MOZ: not in the top 50 I know that for Google Analytics, these numbers are average (12 months). But it cannot explain such a huge gap. Do you have an explanation for that? And also does that mean that I can't trust Google (really?). Because I also did some analysis with Google figures: Monthly searches, Competition... Thanks for you help! Happy Christmas, Floriane.
Moz Bar | | Frontdesk.Anywhere1 -
Did Roger beat Google to this Patent ?
"This ... device will include cameras for eyes and microphones in its ears. It may even have facial and voice recognition abilities so that commands and interactions can be adjusted, based on user permissions. Some versions may include one or more motors, actuators, servos, wheels, and so on to allow the client device to move." (ignore the "creepy" part) http://www.wired.com/2015/05/google-creepy-teddy/
Moz Bar | | EGOL1 -
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 -
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 -
Google Analytics keeps disconnecting, requires "Reauthorization"
I have many campaigns connected to our Google Analytics account (all websites in same GA account) but I keep getting the message "Our connection to your Google Analytics account was lost. Don't worry, you won't lose any data. Please reauthorize now.". I go through the motions of "reauthorizing" and it tells me I'm successful. Minutes later it gives me the same message. I even keep my GA account logged in on the same computer, trying to avoid this. As a result, I'm not getting my Analytics data in my campaign. Help!
Moz Bar | | TotalMarketExposure0 -
Social Analytics: Service that integrates Facebook, Twitter and LinkedIn?
Can anyone recommend a social analytics tool/service that integrates analytics data from Facebook, Twitter and LinkedIn? I'm looking for one place to manage all the data from these individual analytics platforms. So the service would be one where the subscriber would need to provide their account credentials from each platform, and the data would be rolled up into a unified dashboard.Thanks!
Moz Bar | | Allie_Williams0