1.1.1 • Published 9 years ago

hubot-analytics v1.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

hubot-analytics

Build Status Codacy Badge

A hubot script to get google analytics reports

See src/analytics.js for full documentation.

Installation

In hubot project repo, run:

npm install hubot-analytics --save

Then add hubot-analytics to your external-scripts.json:

[
  "hubot-analytics"
]

Configuration

  1. Create a https://console.developers.google.com/project(google project)
  2. Enable "Analytics API" in your project (https://console.developers.google.com/apis/)
  3. Create a service account https://console.developers.google.com/permissions/serviceaccounts and download JSON with private key
  4. Configure the followings environments variables in your hubot server:
GOOGLE_API_PRIVATE_KEY - look for 'private_key' in JSON
GOOGLE_API_CLIENT_EMAIL - look for 'client_email' in JSON

Sample Interaction

Run analytics help for full list of commands

Shows profiles to which the bot has access and store in hubot brain

User> analytics profiles
SpikeBot> @User:
114783908 - Project X
123511123 - Site Plan B
128210353 - Hubot Chat

Shows pageviews and visits of website with "Site Name or ID"

User> analytics pageviews "Site Name or ID"
SpikeBot> @User: SiteName: 6346 visits and 12317 pageviews.

Get percentage mobile x desktop access of website with "Site Name or ID"

User> analytics devices "Site Name or ID"
SpikeBot> @User: desktop - 1450 sessions (21.75%)
mobile - 4903 sessions (73.54%)
tablet - 314 sessions (4.71%)

Get browsers percentage access with "Site Name or ID"

User> analytics browser "Site Name or ID"
SpikeBot> @User: Chrome - 3885 sessions (75.68%)
Firefox - 290 sessions (21%)
Internet Explorer - 115 sessions (3.32%)
1.1.1

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago

0.8.2

9 years ago

0.8.1

9 years ago

0.8.0

9 years ago

0.6.1

10 years ago

0.6.0

10 years ago

0.5.0

10 years ago

0.4.0

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.0

10 years ago