News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Using the Google Analytics API with PHP Logging In
October 02, 2014 @ 09:47:08

The SitePoint PHP blog has a new tutorial posted from Younes Rafie showing you how to use the Google Analytics API from PHP (part one of a series) using the Google PHP API client library to make the connection.

In this series, we're going to see how we can use the Google Analytics API to interact with our Google Analytics data via PHP. [...] In this article we're going to build an app that looks like Google Analytics Explorer, but to make it short, we're going to limit the functionality and discuss how we can extend our demo.

He starts with an overview of the different parts of the Google Analytics APIs including the metadata and real-time reporting systems. In the tutorial he'll be combining several of these to provide all the data needed. After walking you through the creation of a Google developer account, he starts in on the code. With credentials in hand and the library installed via Composer, he shows how to make the connection, check if it's logged in and makes a simple "home" controller that handles the login and OAuth validation process.

0 comments voice your opinion now!
google analytics api login oauth composer tutorial library

Link: http://www.sitepoint.com/using-google-analytics-api-php-logging/

Sherif Ramadan:
Web Analytics with PHP and Google Visualization Made Simple
December 19, 2012 @ 12:38:47

in this new post to his site Sherif Ramadan shares a method for visualizing your website's visitor data with the help of the Google Visualization APIs and some geolocation.

The web is a place where everyone is in your backyard. This can be both a blessing and a curse. How do you know where your website traffic is coming from and how much of it there is? [...] How was traffic led to your website in the first place and why? How long do people stick around and what do they like the most about your site? These are all some of the many questions you can answer with web analytic software, but the real question is why would you want to answer these questions at all and what's the best way to look at the answer?

[...] If we look at a heat map it's easier to spot where the majority of our visitors and traffic are coming from, geographically. It also helps us understand that people visiting a virtual space can, and will, be physically located in different parts of the world.

He includes the steps to recreate a map like the one included in this page showing the current view statistics on his site. He uses a MySQL backend to store the GeoIP data and parses out the Apache "access_log" to get the IPs of the visiting users. He then runs these against the GeoIP data and passes this country data on to Google's visualization for handling. He also recommends using the tools offered by the Google Webmaster Tools to further enhance your introspection into your site's visitors.

0 comments voice your opinion now!
google analytics geolocation analytics visualization country


Project:
Zend Framework Google Analytics Code Generation
August 24, 2011 @ 09:46:58

Martin Aarhof has put together an handy tool for Zend Framework applications that creates the async javascript analytic code recommended by Google to provide tracking information back to Analytics.

It supports: browser Settings Detection, campaign Duration, campaign Fields (custom), cross-domain linking and last but not least Ecommerce tracking.

The configuration lets you set the various keys for your Analytics accounts, the domain name for it to live under, browser detection settings and various other settings for campaign configuration and domain setup. You can find the full code on his github account ready to download or clone.

0 comments voice your opinion now!
project code generation google analytics javascript campaign domain configuration


Project:
Google2Piwik - From Google Analytics to Piwik (Open Source Analytics)
February 09, 2011 @ 09:15:09

Dominik Jendroszczyk passed along a tip about a tool that's been released to help make transitioning from the proprietary Google Analytics systems over to the Piwik open source analytics option simple - Google2Piwik.

More and more users are turning away from Google Analytics (GA) as a provider of web measurement solutions on security, independence and functionality grounds. One problem they run into is that after years of using Google's product they have a considerable inventory of data about their websites stuck with GA, which makes starting over with an alternative provider something of a hassle. [...] Effectively, thanks to Google2Piwik, nothing is stopping you from moving away from Google Analytics to a safer, more robust and more functional alternative.

The tool is written in Python, so you'll need to have that and both access to the Google API and have a Piwik install set up (it's PHP/MySQL based) to make the translation. There's a few limitations to the import, though, so be sure to check out the tool's project page for those. Piwik is an open source project that provides real-time web analytics that installs on your own server and gathers data via a Javascript tag embedded in your site.

0 comments voice your opinion now!
analytics google piwik opensource python tool


Lorna Mitchell's Blog:
Retrieving Data from Google Analytics API using PHP
December 09, 2010 @ 13:40:32

Lorna Mitchell has a new post to her blog continuing her look at using the Google Analytics API. This time the focus is on pulling data out of the API (if you're looking for connection advice, see her previous post).

Recently I started playing with the google analytics API, looking at ways to bring analytics onto dashboards and generate simple reports from the data in there. Very shortly after I started to look at the API, I had working data retrieval, so I thought I'd share my experiences (and code!).

She mentions the data reference document you can use to find the methods to call for specifically what you want as well as a snippet of sample code to connect and pull data based on a set of "query data".

1 comment voice your opinion now!
google analytics api tutorial retrieve


Lorna Mitchell's Blog:
Google Analytics Accounts API
November 23, 2010 @ 10:56:35

In this new post to her blog Lorna Mitchell looks at some of the work she's done to extract information out of the Google Analytics accounts API via an OAuth interface and parsed via SimpleXML.

I'm using pecl_oauth to authenticate users against their google accounts (see my post about using OAuth from PHP), but even after I have a valid google user, working out which analytics accounts they have access to and how to refer to them is a puzzle in itself, so I thought I'd share what I learned.

In her example she shows how to fetch the permissions for a user (which analytics they can access) via a call to the "/feeds/datasources/ga/accounts" URL. This returns some XML easily parsed by SimpleXML to grab the accounts' names and IDs. This is used to fetch the profiles and gather the "magic tableId" for use with the Export API to pull the actual data.

0 comments voice your opinion now!
google analytics account api oauth tutorial simplexml


Richard Thomas' Blog:
Solar Framework Shorts - Future release looks promising
July 20, 2010 @ 08:35:02

Richard Thomas has a quick new (Solar Framework) post to his blog about some of the upcoming cool features of the framework.

A lot of cool features are being hatched in branches that should hit trunk in the near future! [...] Things to look forward to are view helpers for various services like Google Analytics and the various CDN loaders although this is still under review and might be a few releases away.

Other new features he mentions include a reworked authentication stack that will allow for more than one auth adapter to be used at one time (his example is a normal login and a Facebook login). To help, an auth module for Facebook will also be included to make this even easier.

0 comments voice your opinion now!
solar framework authentication google analytics


Sameer Borate's Blog:
Reading Google Analytics data from PHP
February 03, 2010 @ 11:06:08

In a new post to his blog today Sameer Borate has a tutorial about linking your application to the Google Analytics backend and using the requestReportData method to pull back interesting statistics on your sites.

Although no standard library is available from Google for PHP, some small and easy interfaces are available out there. In this post we will see how to access Google Analytics data using PHP using the GAPI library.

The GAPI library is an open sourced project that provides a direct, easy to use interface you can use to connect directly to the Analytics service without having to handle all of the manual stuff yourself. Sameer shows how to get information from the service like the top ten sources and visit counts, regional information and how to do some filtering on the results returned.

0 comments voice your opinion now!
google analytics interface gapi


Ask About PHP Blog:
Google Analytics API class for PHP
May 29, 2009 @ 09:33:05

On the Ask About PHP blog today there's a new tutorial (and a new class) helping you to connect your applications with the Google Analytics backend.

I've been thinking about how I can make use of this API to enhance the sites I'm working on. But before kicking off ideas, I had to find out how to access and use the API. I finally came up with a PHP class that will do all the grunt work of calling the API, you just need to supply your report's parameter and the PHP class will return you an array of Analytics data.

The class [zip] makes connecting to the Analytics backend as easy as dropping in a username/password, defining which profile to use and the date range. The getReport() method does the hard work

0 comments voice your opinion now!
tutorial interface api analytics google


Blue Parabola Blog:
Magento Feature Analysis Series, Part 1 Analytics and Reporting
May 18, 2009 @ 10:46:05

On the Blue Parabola site Matthew Turland has started a series looking at a "new kid on the block" when it comes to PHP e-commerce applications - Magento.

Magento, has gotten a good amount of attention leading up to and since its initial release. I was recently entasked with doing an analysis of its features and thought it might make for an interesting series of blog posts. This first one will cover the Analytics and Reporting feature set.

He mentions the Administrator Action logging, the Google Analytics integration, the Admin Dashboard for reporting overview, included RSS feeds, Accounting Reports and Feedback reporting.

0 comments voice your opinion now!
report analytics analysis feature magento



Community Events





Don't see your event here?
Let us know!


library mvc voicesoftheelephpant podcast framework series composer community symfony interview package introduction language laravel release update version opinion tool security

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework