Use the Google Analytics Management API to leverage Google's extensive website analytics tools. The API uses GET requests over HTTPS and JSON for requests/returns. Some of the functions available with the API are: List Account, Property and View (Profile) information for a user; manage properties and goals; manage user permissions; and upload cost data to Google Analytics for non-Google paid campaigns. See the extensive documentation for code samples, detailed method descriptions, and more.
The following is a list of sample source code snippets that matched your search term. Source code snippets are chunks of source code that were found out on the Web that you can cut and paste into your own source code. Whereas most of the sample source code we've curated for our directory is for consuming APIs, we occasionally find something interesting on the API provider side of things. If you know of some sample source code that would be of interest to the ProgrammableWeb community, we'd like to know about it. Be sure to check our guidelines for making contributions to ProgrammableWeb.
Simple code showing how to log into the Google Analytics API using PHP and CURL using Username/Password Authentication. Wraps the login code up into a class with methods for logging in and then calling API functions.