My favorites | English | Sign in

Faster JavaScript with Closure Tools New!

Google Analytics (Labs)

Client Libraries & Sample Code

Along with the client libraries, this page contains reference documentation and sample code to help you create apps in your chosen language:

For more examples, see the Articles page.

Supported Libraries

This section contains reference, source code, and examples for libraries supported by the Google Analytics API team.

  1. JavaScript


    Client Library
    Documentation
    1. JsDoc Class Reference
    Reference Examples
    1. Account Feed  src file
    2. Data Feed src file 
    3. Interactive Samples New!
    General
    1. Table, Pie and Bar Charts src file
    2. Using Data Views  src file
    3. Motion Charts  src file
  1. Java


    Client Library
    Documentation
    1. JavaDoc Service Reference
    2. JavaDoc Response Reference
    Reference Examples
    1. Account Feed
    2. Data Feed
    General
    1. GA in Google Spreadsheets
  1. HTTP

    Reference
    1. Account Feed XML Response
    2. Data Feed XML Response
    Using cUrl in Bourne Shell
    1. Account Feed
    2. Data Feed

Other Libraries

Google Data Libraries

This library is developed by the Google Data team. Revisions are not coordinated with revisions to the libraries supported by the Google Analytics team.

  1. Python


    Client Library
    Documentation
    1. PyDoc Service Reference
    2. PyDoc Response Reference

User-Contributed Libraries

The code in this section is developed by Google Analytics users. Google makes no promises or representations about their performance, quality, or content.

  1. PHP

    1. PHP5 OOP Interface By Stig Manning
  1. Python

    1. Python-degapi By Sal Uryasev
    2. Python GA Library By Clint Ecker
  1. Ruby

    1. Garb By Viget Labs
    2. Gattica By Rob Cameron