Skip to content

Setting Up Stat Tracker

John Luetke edited this page Mar 9, 2015 · 8 revisions

Prerequisites

Stat Tracker relies on 3 other pieces of software in order to run:

  • git for downloading the source and managing versions
  • composer for dependency management and simple deployment steps
  • ocrad for scanning screenshot uploads.

Please refer tho the specific documentation for these projects in order to set them up in your environment.

Clone the Repo

These directions assume that you will clone the repository on the web server into the path that you intended to run Stat Tracker on. If this is not the case (for example, you will be FTP'ing files), please pay special attention to these steps for any differences.

  1. Run git clone https://github.com/BlueHerons/StatTracker.git stat-tracker.
  2. Run composer describe-version to generate a VERSION file. This file will describe the current version of the code that you have, and be used for determining when there is an update
  3. Copy config.php.sample to config.php
  4. Edit config.php and set the values as necessary. See the comments in the file for further instructions.
  • Settings that begin with GOOGLE_ require you to follow the Get a Google Developer Account steps below.
  1. Run composer update to download dependencies.

Get a Google Developer Account

By default, Stat Tracker uses Google to authenticate users: there is no self-sufficient user management built in. Google's OAuth process provides the account email tied to a user's profile, and that email is used to determine identity. Collisions are not likely, since the account email is enforced as unique on Google's side.

Set up Google Developer Account

  1. Visit console.developers.google.com. Sign in if necessary.

  2. Click the "Create Project" button.

  1. Give your project a name and project ID. These can be whatever you want.

  1. Click "APIs" on the left size of the screen

.

  1. Find "Google+ API" and click the "Off" button to turn it on. You will need to accept Google's terms.

  1. Click "Consent Screen" on the left side and fill out the fields. This information will be visible to your users when the sign in for the first time, and Google asks if the want to grant access to your application.

  1. Click "Credentials" on the left side and click the "Create new Client ID" button.

  • Select "Web Application"
  • In Authorized Javascript Origins, enter the domain[s] that your instance of Stat Tracker will be available from
  • In Authorized Redirect URIs, enter the full web address to your instance of Stat Tracker, and append authenticate?action=callback

  1. Finally, note the CLIENT ID, CLIENT SECRET, and REDIRECT URIs. You will need these values later.