Skip to content

cloudflare-apps/google-analytics-oauth-express

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Analytics OAuth Express

This is a Express service that fetches a user's Google Analytics IDs for the Google Analytics app.

Local Setup

Requirements

  • Node 6.3.1+
  • Cloudflare account
  • Google account

Fill in your credentials in credentials.json from the Google Developer Console

Usage

  • npm install
  • npm start

Cloudflare Service Configuration

After signing in with Cloudflare account, create a new service with the following configuration.

Field Value
OAuth Authentication URL https://accounts.google.com/o/oauth2/v2/auth
OAuth Client ID via Google Developer Console
OAuth Scope https://www.googleapis.com/auth/analytics.readonly, https://www.googleapis.com/auth/userinfo.email
OAuth Token URL https://www.googleapis.com/oauth2/v4/token
OAuth Client Secret via Google Developer Console
Metadata Endpoint https://yourservicedomain.com/account-metadata