diff --git a/.gitignore b/.gitignore index fd58b5d..7752d5a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ static .env storage ana +fathom coverage.out diff --git a/Dockerfile b/Dockerfile index 5ad9ec8..bed2995 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,5 @@ +# TODO: Fix this. + FROM alpine:latest EXPOSE 8080 diff --git a/Makefile b/Makefile index 20ccc14..c52548a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,5 @@ DIST := dist -EXECUTABLE := ana -IMPORT := github.com/dannyvankooten/ana +EXECUTABLE := fathom LDFLAGS += -extldflags "-static" -X "main.Version=$(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')" diff --git a/README.md b/README.md index d9d599b..f9f506f 100644 --- a/README.md +++ b/README.md @@ -1,44 +1,44 @@ -Ana. Open Source Web Analytics. +Fathom - simple website analytics ============================== -[![Go Report Card](https://goreportcard.com/badge/github.com/dannyvankooten/ana)](https://goreportcard.com/report/github.com/dannyvankooten/ana) -[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/dannyvankooten/ana/master/LICENSE) +[![Go Report Card](https://goreportcard.com/badge/github.com/usefathom/fathom)](https://goreportcard.com/report/github.com/usefathom/fathom) +[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/usefathom/fathom/master/LICENSE) -This is nowhere near being usable, let alone stable. Please treat as a proof of concept while we work on getting this to a stable state. **Do not run Ana in production yet unless you like spending time on it.** Things will keep changing for the next few months. +This is nowhere near being usable, let alone stable. Please treat as a proof of concept while we work on getting this to a stable state. **Do not run Fathom in production yet unless you like spending time on it.** Things will keep changing for the next few months. -![Screenshot of the Ana dashboard](https://github.com/dannyvankooten/ana/raw/master/assets/dist/img/screenshot.png?v=6) +![Screenshot of the Fathom dashboard](https://github.com/usefathom/fathom/raw/master/assets/dist/img/screenshot.png?v=6) ## Installation -For getting a development version of Ana up & running, please go through the following steps. +For getting a development version of Fathom up & running, please go through the following steps. -1. get code: `go get -u github.com/dannyvankooten/ana` (or `git clone` repo into your `$GOPATH` ) +1. get code: `go get -u github.com/usefathom/fathom` (or `git clone` repo into your `$GOPATH` ) 1. run `npm install` (in code directory) to install all required dependencies 1. Rename `.env.example` to `.env` and set your database credentials. 1. Compile into binary: `make` -1. Create your user account: `ana register ` +1. Create your user account: `fathom register ` 1. Run default Gulp task to build static assets: `gulp` -1. Start the webserver: `ana server --port=8080` & visit **localhost:8080** to access your analytics dashboard. +1. Start the webserver: `fathom server --port=8080` & visit **localhost:8080** to access your analytics dashboard. -To start tracking, include the following JavaScript on your site and replace `ana.dev` with the URL to your Ana instance. +To start tracking, include the following JavaScript on your site and replace `yourfathom.com` with the URL to your Fathom instance. ```html - + - + ``` ## License diff --git a/assets/dist/index.html b/assets/dist/index.html index deb91b5..16f33bd 100644 --- a/assets/dist/index.html +++ b/assets/dist/index.html @@ -1,7 +1,7 @@ - Ana - open web analytics + Fathom - simple website analytics diff --git a/assets/dist/js/tracker.js b/assets/dist/js/tracker.js index a820fdc..ff5d982 100644 --- a/assets/dist/js/tracker.js +++ b/assets/dist/js/tracker.js @@ -1,6 +1,6 @@ 'use strict'; -var queue = window.ana.q || []; +var queue = window.fathom.q || []; var trackerUrl = ''; var commands = { "trackPageview": trackPageview, @@ -61,8 +61,8 @@ function trackPageview() { document.body.appendChild(i); } -// override global ana object -window.ana = function() { +// override global fathom object +window.fathom = function() { var args = [].slice.call(arguments); var c = args.shift(); commands[c].apply(this, args); @@ -70,5 +70,5 @@ window.ana = function() { // process existing queue queue.forEach(function(i) { - ana.apply(this, i); + fathom.apply(this, i); }); diff --git a/assets/src/js/tracker.js b/assets/src/js/tracker.js index a820fdc..ff5d982 100644 --- a/assets/src/js/tracker.js +++ b/assets/src/js/tracker.js @@ -1,6 +1,6 @@ 'use strict'; -var queue = window.ana.q || []; +var queue = window.fathom.q || []; var trackerUrl = ''; var commands = { "trackPageview": trackPageview, @@ -61,8 +61,8 @@ function trackPageview() { document.body.appendChild(i); } -// override global ana object -window.ana = function() { +// override global fathom object +window.fathom = function() { var args = [].slice.call(arguments); var c = args.shift(); commands[c].apply(this, args); @@ -70,5 +70,5 @@ window.ana = function() { // process existing queue queue.forEach(function(i) { - ana.apply(this, i); + fathom.apply(this, i); }); diff --git a/ana.go b/fathom.go similarity index 100% rename from ana.go rename to fathom.go diff --git a/gulpfile.js b/gulpfile.js index 46887d6..5f7be1b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -78,4 +78,6 @@ gulp.task('sass', function () { gulp.task('watch', ['default'], function() { gulp.watch(['./assets/src/js/**/*.js'], ['browserify', 'tracker'] ); gulp.watch(['./assets/src/sass/**/**/*.scss'], ['sass'] ); + gulp.watch(['./assets/src/**/*.html'], ['html'] ); + gulp.watch(['./assets/src/img/**/*'], ['img'] ); });