nebula-analytics / nebula-automated-setup

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Project Nebula Analytics/Oauth Demo

Setup

Ensure you have python 3.7+ installed.

Install required libs: pip install -r requirements.txt.

Obtain a service account id and client secret by following the instructions here.

Add the above information to the empty fields in credentials.json.

Run

In terminal navigate to the directory of main.py.

To start the server run the command python main.py.

In a browser navigate to https://localhost:5000/oauth/authorize/ and complete the oauth flow.

You should be redirected to the index page which will now show the following message:

{
  "auth_url": "https://localhost:5000/oauth/authorize/", 
  "host": "https://localhost:5000/", 
  "message": "Hello World", 
  "status": "Online", 
  "upstream": {
    "Google Analytics": "Connected"
  }
}
  • To test the realtime api navigate to https://localhost:5000/realtime?ga=<Insert Analytics View ID here>

  • To test the reporting api navigate to https://localhost:5000/analytics?ga=<Insert Analytics View ID here>

About

License:GNU General Public License v3.0


Languages

Language:HTML 51.3%Language:Python 44.7%Language:JavaScript 1.8%Language:Dockerfile 1.1%Language:CSS 1.1%