Google Analytics superProxy

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

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.

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 sessions
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

By default any API Query you create (and enable) using
the Google Analytics superProxy will be accessible to anyone
who knows the Public Endpoint Request URL for the API Query.
However, only admins and users of the application have the permission and
access to create and manage API queries.

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.

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. Note: Only valid Google
accounts can be added as users to the Google Analytics superProxy.

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.

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.

Admins may filter the list of API Queries to only show
queries they own by adding the filter=owner query parameter to
the URL of the admin page. E.g.
https://your-application-id.appspot.com/admin?filter=owner.

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
G Suite, which allows you to restrict an application to users managed by
your domain. See
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.