+353 (0)87 1254033
+33 (0)617 104022

 
Technical Articles

Recent News & Articles

» Success with Google Website Op...
» Timeware Roster System (v2.0 S...
» Recommended site architecture ...
» Enabling Gzip compression on y...
» Secure file_get_contents PHP f...

Live Support
Contact one of our team members now to discuss your project requirements. Helpful & knowledgable team members are on hand to provide you with expert advice. Live support is currently


Google Analytics API Stacked Pageviews for PHP 4

Posted: Tue, 10th August 2010 in SEO

This technique, originally published on SEOMoz, outlines how to generate reports and charts depicting the performance of different sections of a website over a given time frame as opposed to a flat overall view of the website's traffic. The raison d'etre is that different website sections perform differently.

When I came across this article, I was intrigued and thought it invaluable to employ it for our clients. The only downside was the manual collection of data. Thankfully, others also felt this a major drawback and Maki Car Rental produced a couple of PHP files to automate the data collection process.

This worked superbly on some of our clients servers however some were still running PHP 4 so we've made available a version of the code which uses PHP 4 functions rather than the original PHP 5 implementation. We've also tacked on a small UI so customised reports/metrics/date ranges can be produced quickly. The PHP 4 version is available for download here.

This version of the script also allows you to quickly adjust the CSV delimiter by altering the
$csv_field_delim
variable. Many thanks to those involved, this is an absolutely superb technique for collecting data enabling users of Google Analytics to make valuable business decisions.

As with all articles on Celtic Productions, this article is protected by international copyright laws. It may be linked to (we are of course most grateful of links to our articles), however, it may never be reproduced without the prior express permission of its owners, Celtic Productions.
About Us | Our Products | Our Services | Technical Articles | How we work | News | Contact Us | Privacy Policy