Google Analytics Request PHP Class5/22/2011
<?php require_once('GoogleAnalyticsRequest.php'); $ga = new GoogleAnalyticsRequest(); // pass TRUE = debug $ga->domain = 'example.com'; $ga->account = 'UA-12345678-1'; // $ga->custom defaults to user's IP. $ga->makeRequest();
I haven’t done extensive testing on this, and I think its using the old Urchin GA request type, but I think it will do for my purposes. Leave a comment if you have any suggestions on how to improve this.