Google Analytics API

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
You are viewing a wiki page. You are welcome to join the group and then edit it. Be bold!

Project information

Project page on drupal.org: http://drupal.org/project/google_analytics_api
Student: Joel Kitching (jkitching on d.o, jkitching@drupal.org on g.d.o)
Mentor: Dmitri Gaskin (dmitrig01)
Co-mentor(s): Rick Vugteveen (rickvug)
Joel's Blog: Gone Digital

Current status: Developing low-level aspects.

Description

Takes advantage of data available from the newly-released Google Analytics API. Exact scope of the project is not yet completely planned, but it will include two main items. The first is a base API on the Drupal side adding information to nodes, etc. regarding analytics statistics. The second is an admin section to summarize some of the analytics information available.

Project schedule

  • May 23 - June 7: Community Bonding Period

    • Fax my Student Foreign Certification and Proof of Enrollment to Google
    • Obtain CVS account on drupal.org
    • Create d.o project (how-to: create, maintain)
    • IRC/VoIP meeting with mentors
    • Refine scope and timeline
  • June 8 - June 21

    • Learn about Data Export API authentication, account listing, and report requesting
    • Decide on OAuth or AuthSub authentication
    • Figure out whether we can use ClientLogin or if AuthSub must be used for authorization (AuthSub is still preferable.)
    • Convert existing Google Analytics PHP library to provide support for AuthSub
    • Get access to a high-volume traffic website for sample Analytics data (currently waiting on imagexmedia.com)
    • Learn how to use unit tests, faking a Google Analytics server to receive and send data (SimpleTest official guide, quick guide, cheat sheet -- example at Drupal HEAD, modules/openid: open_id.test and tests/ for the module)
    • Learn how to commit to the created project on the Drupal.org CVS server
    • Set up a blog for the project
    • Publish blog posts about the project
    • Create a low-level Drupal wrapper function around the PHP library authenticates user appropriately, remembers the token, etc.)
    • IRC/VoIP meeting with mentors (sometime during week of June 22?)
  • June 22 - July 5

    • Create admin page where current AuthSub session can be managed -- login and logout.
    • Add permission to use Google Analytics data and make sure all calls to this information is protected by this permission.
    • Backend (Drupal implementation of API) is complete
  • July 6 - July 12

    • Define features for the front-end interface
    • Start basic code (main dashboard page, tab for each node)
    • Create sample "query" page to retrieve custom data
  • July 13

    • Midterm evaluation deadline (passed)
  • July 13 - July 27

    • Statistics block with graphs by Google Charts
  • July 28 - August 10

    • Statistics section on nodes
  • August 11 - August 17

    • Implement unit tests, faking a Google Analytics server to receive and send data

Update

Project has received a passing grade. I will continue heavy development over the next couple months and maintenance after that.


Notes

Future Features

  • Add support to Analytics library for multiple page fetching
  • Implement caching if necessary
  • Views integration (wait for Views 3?)