rebrand executable & README to fathom

This commit is contained in:
Danny 2018-04-24 10:12:38 +02:00
parent d8e458625d
commit 0b68a519fb
9 changed files with 37 additions and 33 deletions

1
.gitignore vendored
View File

@ -3,4 +3,5 @@ static
.env
storage
ana
fathom
coverage.out

View File

@ -1,3 +1,5 @@
# TODO: Fix this.
FROM alpine:latest
EXPOSE 8080

View File

@ -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//')"

View File

@ -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 <email> <password>`
1. Create your user account: `fathom register <email> <password>`
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
<!-- Ana tracker -->
<!-- Fathom - simple website analytics - https://github.com/usefathom/fathom -->
<script>
(function(d, w, u, o){
w[o]=w[o]||function(){
(w[o].q=w[o].q||[]).push(arguments)
(function(f, a, t, h, o, m){
a[h]=a[h]||function(){
(a[h].q=a[h].q||[]).push(arguments)
};
a=d.createElement('script'),
m=d.getElementsByTagName('script')[0];
a.async=1; a.src=u;
m.parentNode.insertBefore(a,m)
})(document, window, '//ana.dev/tracker.js', 'ana');
ana('setTrackerUrl', '//ana.dev/collect');
ana('trackPageview');
o=f.createElement('script'),
m=f.getElementsByTagName('script')[0];
o.async=1; o.src=t;
m.parentNode.insertBefore(o,m)
})(document, window, '//yourfathom.com/tracker.js', 'fathom');
fathom('setTrackerUrl', '//yourfathom.com/collect');
fathom('trackPageview');
</script>
<!-- / Ana tracker -->
<!-- / Fathom -->
```
## License

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html class="no-js">
<head>
<title>Ana - open web analytics</title>
<title>Fathom - simple website analytics</title>
<link href="/css/styles.css" rel="stylesheet">
</head>
<body>

View File

@ -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);
});

View File

@ -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);
});

View File

View File

@ -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'] );
});