I have a site that I am developing for a local business. It is a mainly static site, but the headers, breadcrumbs, navigation, and footers, are all loaded from include files. This makes it easy to add or change common content, and PHP coding can make some of those features dynamic.
New content (only one or two pages per month, once the initial 100 pages are done) is initially uploaded into a development folder. After it has been checked by all the people that need to see it, it gets moved to the live part of the site.
Google analytics is used on the site, and the GA code is suppressed from the page if the page is in the development folder. We only want to track users and pageviews on the live "public" part of the site.
A recent requirement is that we now want to exclude all the site owners and any developers from being counted as visitors even on the live part of the site as they are seriously skewing the results.
The way that GA works now, is that Google wants to potentially track everything but thay let you add filters to exclude some data from being counted.
In the current situation, no-one has a static IP address, so the "exclude by IP method" is of no use.
I have tried the "set an ignore cookie" method, coupled with a filter to remove those users from the count, but that still relies on the users visiting the special page used to set that cookie. The special page still shows in the stats, for that first visit, as well.
There is also a danger that other people will find, and visit, the "special page" and be fed the "ignore_me" cookie, when in fact they are real visitors that we actually did want to count.
What I would like to do, is feed the "ignore_me" cookie to anyone reading any of the pages in the development folder (which is password protected) so that when they later browse the real site they are not included in the stats.
That way, they don't need to visit any "special page" to pick up that cookie. They are already pre-qualified as being one of the "site owners" by having read some pages in the password protected development area, so only those people could ever get the cookie.
The problem is, is that if I add the GA "ignore_me" code to the pages in the development area, Google will be able to "see" those URLs, will track them, and they will show in the reports. I want it to be as if those pages don't exist at all, as far as Google is concerned.
It appears that in the setting of the "ignore_me" cookie, you need the rest of the GA code to be loaded first. That code then automatically tracks the user as having been on that page. The cookie for ignored users looks like this:
with a matching "custom filter" using "exclude" and "ignore_me" to suppress those views from the stats.
So, I think my questions are this:
- Is the cookie always called "__utmv"?
- Is the seven-digit number static, and is it associated with the site, the GA account, or with the user?
- Can I somehow set that cookie and the right value for it, without calling the GA code that will track the user on that page?
Some clarification. There are three things you can currently do:
- omit the GA code from the page: users will not be tracked.
- add the GA code to the page and users will be tracked.
- add the GA code as above, and an extra line like:
<body onLoad="java scr ipt:pageTracker._setVar('ignore_me');">
so that subsequent page views by that user can be excluded from the stats by the matching filter set up via the GA control panel. However, those page views are still transmitted to Google, appear in the "raw" stats, and have to excluded using a "custom filter".
What I would like, is an extra function: a way to force the "ignore_me" cookie, without Google tracking that page view AT ALL.
Can I somehow "fake" the right cookie name and cookie data onto the user's machine, while they browse the development folder, to make this work, without having to load up the regular GA code on the page first?