mirror of https://github.com/status-im/fathom.git
rebrand executable & README to fathom
This commit is contained in:
parent
d8e458625d
commit
0b68a519fb
|
@ -3,4 +3,5 @@ static
|
||||||
.env
|
.env
|
||||||
storage
|
storage
|
||||||
ana
|
ana
|
||||||
|
fathom
|
||||||
coverage.out
|
coverage.out
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# TODO: Fix this.
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
3
Makefile
3
Makefile
|
@ -1,6 +1,5 @@
|
||||||
DIST := dist
|
DIST := dist
|
||||||
EXECUTABLE := ana
|
EXECUTABLE := fathom
|
||||||
IMPORT := github.com/dannyvankooten/ana
|
|
||||||
|
|
||||||
LDFLAGS += -extldflags "-static" -X "main.Version=$(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')"
|
LDFLAGS += -extldflags "-static" -X "main.Version=$(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')"
|
||||||
|
|
||||||
|
|
44
README.md
44
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)
|
[![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/dannyvankooten/ana/master/LICENSE)
|
[![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
|
## 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. run `npm install` (in code directory) to install all required dependencies
|
||||||
1. Rename `.env.example` to `.env` and set your database credentials.
|
1. Rename `.env.example` to `.env` and set your database credentials.
|
||||||
1. Compile into binary: `make`
|
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. 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
|
```html
|
||||||
<!-- Ana tracker -->
|
<!-- Fathom - simple website analytics - https://github.com/usefathom/fathom -->
|
||||||
<script>
|
<script>
|
||||||
(function(d, w, u, o){
|
(function(f, a, t, h, o, m){
|
||||||
w[o]=w[o]||function(){
|
a[h]=a[h]||function(){
|
||||||
(w[o].q=w[o].q||[]).push(arguments)
|
(a[h].q=a[h].q||[]).push(arguments)
|
||||||
};
|
};
|
||||||
a=d.createElement('script'),
|
o=f.createElement('script'),
|
||||||
m=d.getElementsByTagName('script')[0];
|
m=f.getElementsByTagName('script')[0];
|
||||||
a.async=1; a.src=u;
|
o.async=1; o.src=t;
|
||||||
m.parentNode.insertBefore(a,m)
|
m.parentNode.insertBefore(o,m)
|
||||||
})(document, window, '//ana.dev/tracker.js', 'ana');
|
})(document, window, '//yourfathom.com/tracker.js', 'fathom');
|
||||||
ana('setTrackerUrl', '//ana.dev/collect');
|
fathom('setTrackerUrl', '//yourfathom.com/collect');
|
||||||
ana('trackPageview');
|
fathom('trackPageview');
|
||||||
</script>
|
</script>
|
||||||
<!-- / Ana tracker -->
|
<!-- / Fathom -->
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html class="no-js">
|
<html class="no-js">
|
||||||
<head>
|
<head>
|
||||||
<title>Ana - open web analytics</title>
|
<title>Fathom - simple website analytics</title>
|
||||||
<link href="/css/styles.css" rel="stylesheet">
|
<link href="/css/styles.css" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var queue = window.ana.q || [];
|
var queue = window.fathom.q || [];
|
||||||
var trackerUrl = '';
|
var trackerUrl = '';
|
||||||
var commands = {
|
var commands = {
|
||||||
"trackPageview": trackPageview,
|
"trackPageview": trackPageview,
|
||||||
|
@ -61,8 +61,8 @@ function trackPageview() {
|
||||||
document.body.appendChild(i);
|
document.body.appendChild(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
// override global ana object
|
// override global fathom object
|
||||||
window.ana = function() {
|
window.fathom = function() {
|
||||||
var args = [].slice.call(arguments);
|
var args = [].slice.call(arguments);
|
||||||
var c = args.shift();
|
var c = args.shift();
|
||||||
commands[c].apply(this, args);
|
commands[c].apply(this, args);
|
||||||
|
@ -70,5 +70,5 @@ window.ana = function() {
|
||||||
|
|
||||||
// process existing queue
|
// process existing queue
|
||||||
queue.forEach(function(i) {
|
queue.forEach(function(i) {
|
||||||
ana.apply(this, i);
|
fathom.apply(this, i);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var queue = window.ana.q || [];
|
var queue = window.fathom.q || [];
|
||||||
var trackerUrl = '';
|
var trackerUrl = '';
|
||||||
var commands = {
|
var commands = {
|
||||||
"trackPageview": trackPageview,
|
"trackPageview": trackPageview,
|
||||||
|
@ -61,8 +61,8 @@ function trackPageview() {
|
||||||
document.body.appendChild(i);
|
document.body.appendChild(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
// override global ana object
|
// override global fathom object
|
||||||
window.ana = function() {
|
window.fathom = function() {
|
||||||
var args = [].slice.call(arguments);
|
var args = [].slice.call(arguments);
|
||||||
var c = args.shift();
|
var c = args.shift();
|
||||||
commands[c].apply(this, args);
|
commands[c].apply(this, args);
|
||||||
|
@ -70,5 +70,5 @@ window.ana = function() {
|
||||||
|
|
||||||
// process existing queue
|
// process existing queue
|
||||||
queue.forEach(function(i) {
|
queue.forEach(function(i) {
|
||||||
ana.apply(this, i);
|
fathom.apply(this, i);
|
||||||
});
|
});
|
||||||
|
|
|
@ -78,4 +78,6 @@ gulp.task('sass', function () {
|
||||||
gulp.task('watch', ['default'], function() {
|
gulp.task('watch', ['default'], function() {
|
||||||
gulp.watch(['./assets/src/js/**/*.js'], ['browserify', 'tracker'] );
|
gulp.watch(['./assets/src/js/**/*.js'], ['browserify', 'tracker'] );
|
||||||
gulp.watch(['./assets/src/sass/**/**/*.scss'], ['sass'] );
|
gulp.watch(['./assets/src/sass/**/**/*.scss'], ['sass'] );
|
||||||
|
gulp.watch(['./assets/src/**/*.html'], ['html'] );
|
||||||
|
gulp.watch(['./assets/src/img/**/*'], ['img'] );
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue