Google Analytics

Google Analytics superProxy

Pete Frisella, Google Analytics Developer Advocate – July 2013

This document is about the Google Analytics superProxy and explains how to get started, use specific features, and discusses important considerations.

  1. Introduction
  2. Setup
  3. Managing Users
    1. Admin Users
  4. Domain Restrictions
  5. Quota Considerations
  6. Community & Issue Tracker
More

Introduction

The Google Analytics superProxy allows you to publicly share your Google Analytics reporting data. You can use it to power your own custom dashboards and widgets, transform responses to various formats, test, and much more.

The Google Analytics superProxy works with the Core Reporting API, Real Time Reporting API , and Multi-Channel Funnels Reporting API.

Feature Highlights:

  • Publicly share your Google Analytics data.
  • Use the proxy to power your own custom dashboards.
  • Convert to CSV, Data Table, TSV.
  • Relative dates are supported (e.g. last 7 days).
  • Automatically refreshes report data.
  • Caching - fast responses and efficient quota usage.

How It Works

Create a query for your Google Analytics data and that specific reporting data will be publicly available at a new URL that you can share. Anybody who visits the URL will have access to the reporting data without requiring any authorization.

For example, you could create a query to retrieve the top 10 browsers based on pageviews for the past week, and one query for the number of visits yesterday, and so on. You decide which queries you want to make public and how often you want the data to be updated and the Google Analytics superProxy will take care of the rest.

Tip:You can use the Query Explorer to generate reports and then copy the Query URI to use with the Google Analytics superProxy

Setup and Creating a Query

The Google Analytics superProxy is a web application that runs in the Google App Engine environment. You can download and deploy this application by following a simple set of instructions.

Managing Users

The Google Analytics superProxy includes a simple user management interface that you can use to add users. Each user will only be able to list and manage API queries they create.

Only admins can manage users. To add a new user:

  1. From the Google Analytics superProxy admin interface (E.g. https://your-application-id.appspot.com/admin) click on the Manage Users button.
  2. On the Manage Users page, enter the email address of the user you want to add and click on the Add User button. The user will be added but they will not have access until they activate the account.
  3. Tell the user to activate their account by visiting the /admin/activate page. E.g. https://your-application-id.appspot.com/admin/activate. They will need to be signed into the Google account for the email you added in order for the activation to work.
  4. Once the user has successfully activated their account they will be able to visit the /admin page, authorize access to their Google Analytics account and start creating their own API queries.

Admin Users

Google Analytics superProxy admin users are added using the App Engine Administration Console. Any user added through this console, of any role, will be an admin.

Admins are able to list and manage any user's API queries.

Domain Restrictions

In some cases you may want to take advantage of the features offered by the Google Analytics superProxy but you don't want to make any data public beyond a certain set of users or domain. By default, for any free application hosted on App Engine, anyone signed in with a Google account may access your public endpoints.

If you want to further restrict access your application, you must implement your own authentication layer in front of Google Analytics superProxy or use Google Apps, which allows you to restrict an application to users managed by your domain. See the Configuring Your App's Authentication for details.

Quota Considerations

The Google Analytics superProxy helps you save quota by serving reporting data from the cache/datastore. However, setting short refresh intervals could still cause you to consume quota quickly. To avoid this, make sure you're refreshing queries at a reasonable interval for the type of data being requested.

App Engine

The free default quota limits for App Engine applications are generous and will likely be sufficient for most use cases. However, you can enable billing to increase or remove the default limits. See App Engine Quotas for details.

Community & Issue Tracker

The Google Analytics superProxy forum is a discussion group where you can ask questions, share ideas, and get feedback on your awesome projects. goo.gl/Tw6kP9

The Issue Tracker is where you can report and track issues and feature requests for the Google Analytics superProxy. goo.gl/ZV63Cr

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.