Giter VIP home page Giter VIP logo

ga's Introduction

ga

Google Analytics via the Command Line

THIS IS A WORK IN PROGRESS, CURRENTLY AUTH IS WORKING

API Keys

To apply for API access at the Google APIs Console:

  • Visit the Google APIs Console. Log in if prompted to do so.
  • Create a project for your application (if you have not already done so) by clicking Create project.
  • Select APIS & AUTH > APIs from the side menu. The list of accessible Google services appears.
  • Scroll through the list until you find Google Analytics, click the Status switch next to the service name (so that it switches from OFF to ON). NOTE: google autmoatically will have other services turned on you can switch those off as long as you keep Google Analytics on.
  • For some services, the Console will display a Terms of Service pane. To go ahead, check the I agree to these terms box, then click Accept.
  • Scroll back to the top of the page and APIS & AUTH > Credentials in the side menu.
  • The API Access pane appears.
  • Click Create an OAuth 2.0 Client ID.
  • The Create Client ID dialog appears.
  • Click the Installed Application radio button and Other. It should look like below: client_id
  • Click Create.
  • The credentials under Client ID for native application can be used when prompted by ga --configure

Installation

Via Go

$ go get github.com/jfrazelle/ga

Binaries

Usage

Global Options

  • --disable-plot: Disable plotting
  • --clientid, -c: Google OAuth Client Id, overrides the .ga-cli files
  • --secret, -s: Google OAuth Client Secret, overrides the .ga-cli files
  • --debug, -d: Debug mode
  • --json: Print raw json
  • --raw: Don't colorize output

accounts

Get accounts

configure, config

Configure your Google API Credentials

now

Get Realtime Data, dimensions and data reference available at https://developers.google.com/analytics/devguides/reporting/realtime/dimsmets/

  • --profile, p: Profile id for which to get data
  • --metrics, -m: Real time metrics to get. default: 'rt:activeUsers'
  • --dimensions, --dim: Real time dimensions (comma-separated). ex: 'rt:pagePath,rt:pageTitle'
  • --sort: Sort to apply

profiles

Get profiles

  • --account: Account id for which to list profiles

properties

Get profiles

  • --account: Account id for which to list properties

help, h

Shows a list of commands or help for one command

Analytics

ga's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.