I have a somewhat unique business model with my site. I have aggregated writers and pay them based on traffic they bring to the site via their individual blogs under our URL. I track this information with Google Analytics.
My server stats are showing approx. 50% higher than my Google Analytics data. I realize I don’t have the GS code on every page rendered by EE. I also understand, that it’s likely there’s no way to do that simply without either pasting a global variable code, or the entire GA.js code.
Am I missing something? Is there a better tool. Is ther a simple way of getting that GA code on every page?
I do as Serafico said, which is to just pop the Analytics code at the bottom of my footer embed, which is called on each page. Or of course you could create a specific Google Analytics embed if that suits your need better.
Further more your server will counts hits from your visits and Google Analytics will not if set up correctly. Server will also count all sorts of other oddities that GA cannot such as requests for: urls that don’t exist, images, favicons, rss feeds requests (actually GA can track these I think - but you need to set it up). So there is quite a lot.
The important thing for you though is counting haw many pages are viewed so that your Authors get the correct pay. Using GA means that you are counting page views - which is what you want as you don’t want to pay them for hits that are not page views! As GA is a third party product, disputes over how many hits each story has had should not lead to problems - if the stats were from your own server logs your authors could dispute how you interpret them or indeed if they are accurate as you have access to them, so Google Analytics is a very good idea.
You could set up Google Analytics so that each Author has a separate Analytics account - and then if they have a Gmail account you could send them stats every month so they could see what to expect in payments - if this worked with your business model.
One of the projects I work on has two stats services going, and they are remarkably close (within a few hundred page views for 50K+). While not perfect, I think GA is pretty accurate.
Thanks all. I have been using embeds, but really think I’m missing some traffic. My advertisers (Apple, Adobe, HP, etc) are all given access to my GA account as are my writers. In addition to my server stats tracking much higher, outside traffic tools like Alexa, Trafficestimate.com which typically track much lower than reallity are showing higher than my GA numbers.
Make me think something is askew. I’ve checked each writer page and they all have the .js script so in terms of paying my writers, they are getting what is deserved. Just not sure the entire site is getting the traffic realization in GA as it should.
It certainly would be great if the next EE build contained a place to put in your GA code and it was automatically embedded everywhere!
I saw something on another thread where someone said he used a “shared folder”. What was he referring to?
It certainly would be great if the next EE build contained a place to put in your GA code and it was automatically embedded everywhere!
We already have the tools to do it. If you are not sure of embeds then you can always use a Global Variable - this way if you need to change your GA code you only need do it in one place. Global Variables link is available from the templates pages - just add a new one - call it something useful like stats (or Mi or GoogleAnalytics if you like) then add the variable onto any page
{stats}
Usually on the sites I build I have a footer embed that goes on all pages so I don’t need to use a Global Variable for this but if I had more than one footer template then I would use it.
I’ve noticed similar for a client site that we introduced Google Analytics on a couple months ago. Google is way lower than FunnelWeb processing of raw stats. I haven’t had time to go back through and try to figure out all the reasons why. I have Google code in header; and while the site does have different header files, they are related to domain, so technically the main site has one header, and each subsites have their own headers.
I was planning on adjusting the code placement to see if that helped; but I’m talking massive numbers. Google may be displaying 100-150,000 hits/page views per month; and raw stats has over 3 million. And with the raw stats, we exclude staff visits by IP addresses, visits to the control panel, and certain folders, since they are only accessible by staff. It’s just weird.
My goal was to test on an easier site. One where their is a single header and footer, and low page hits, to see how Google compares; and what its excluding. Because the current site does do domain tests, if/elseif embeds, and a number of other things to insure the correct header and footer are displaying based on where a person came from and what article they are pulling. There could be a number of reasons views are excessively low in Google.
Just as a quick note for those using Google Analytics, Google does specify that you should be placing the analytics code just before the </body> tag at the end of your page and it shouldn’t go at the top of the page.
Not sure if this is causing your problems or not though. I don’t think you can ever get an absolutely 100% true representation using any of the methods as there will always be something wrong somewhere but I have to say that GA has been pretty solidly right on the few sites I have placed it on.
Yeah I do have the .js code right above the </body> tag and also tried the global variable. I know I’m missing pages like members etc, because I have gotten in there yet. Just can’t image the difference is that large on just those specialty templates.
So to get this straight, the folks here that are using GA on EE are getting solid results? This is compared to what as the reference? Webstats?
I get accurate results compared to analog (unix stats program) and also compared to what Quantcast shows in terms of the whole site. Based on that, I think GA is pretty dang good.
Mark...Have a site that validates strict, put the Google code at the end before </body> and it no longer does...Arrrrg.
For strict, doesn’t all javascript have to be in the head area?
Thanks guys. I really appreciate the feedback and this forum in general.
Now if I can only get my solspace tags to work cross-sites with multiple site manager I’d be a happy camper! Folks over at the solspace forums don’t respond as quickly…
Mark...Have a site that validates strict, put the Google code at the end before </body> and it no longer does...Arrrrg.
For strict, doesn’t all javascript have to be in the head area?
As far as I know it doesn’t matter where JS goes in a document whether it be STRICT or not but Google does say that the code needs to go just before the </body> tag and I did read right when they brought out GA that if it isn’t there then results and mileage may vary.
I have also not had any problems with validation on STRICT sites when the code is at the bottom of the page.
simoncox/mark—Hmmm, sure doesn’t here...Client supplied Google code…
----------
Google-No - Validates Fine
Google-Yes - 7 Errors, all in the Google code
Edited: Removed links as problem was solved...see posts below.
What kind of errors are they as I think you may have posted the same URL twice above ?
Also what does your GA code look like. This is mine and it works fine. have taken out some of the specifics although it can be viewed easily enough on the site it is on I suppose
Don’t know if yours is anything like that? I checked out the links above but as I said before I don’t think you have the correct URL for one of them or you have taken out the GA code so I can’t really see what is going on
Ooops - Corrected the links
----------
Looks like everything is the same as yours Mark except this… (unescape( ...in the third line.
I presume I could use yours and just change the tracker # (UA-XXXXXXX-1)
----------
Edit-Add: The errors look like this…
Line 632, Column 96: document type does not allow element “script” here.
…ics.com/ga.js’ type=’text/javascript’>\<\/script>" );