Forum Moderators: phranque

Message Too Old, No Replies

Caching & Logging (Reporting)

Google Analytics vs AWStats reporting of cached pages

         

Swanny007

4:49 am on Mar 19, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



OK well I've implemented a server-side cache on one small section of my site as a test. The section is totally db driven, the pages are cached for a maximum of 10 - 15 minutes. I use internal AWStats reports and Google Analytics as well.

My question is this... on the cached pages do they get reported in the AWStats or GAnalytics reports? It's unclear to me whether I will have accurate pageview/visitor/etc. statistics using caching.

I'd like to use caching more to speed up the site (I'd especially like to cache the home page), but I also need to track pageviews.

Oh, I also use OpenAds to serve ads. If I understand right any scripts called by JavaScript (like OpenAds & AdSense) should load normally just fine.

[edited by: Swanny007 at 4:49 am (utc) on Mar. 19, 2008]

phranque

9:12 am on Mar 19, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



typically the analytics tracking happens on the browser side, with either javascript execution or a web (image) beacon, so the caching is irrelevant.

jtara

5:07 pm on Mar 19, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



AWStats is a different situation, though. AWStats is a server-side log analyzer.

You haven't said how you've implemented your cache. Is it a separate server ahead of your main web server? Or is it an Apache (or other web server) plugin?

If the latter, I presume it logs the cache hits in the same log file, and there should be no difference.

Otherwise, I'd look into whether it's possible for AWStats to combine multiple log files.

Swanny007

7:07 pm on Mar 19, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It's a PHP script that stores the cached files outside public_html. I can post the code if that helps any.

jtara

7:37 pm on Mar 19, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's a PHP script

Then it will make no difference. Your server is still logging the accesses.

phranque

1:52 am on Mar 20, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



if you are caching pages, there should be 2 logs.
one is the log for external access to the cached pages.
the other log is the server accessing the script to update the cache when necessary.
you want to look at the "external-facing" log.

google analytics does nothing with logs on your server.