fathom/README.md

78 lines
3.5 KiB
Markdown
Raw Normal View History

2018-04-24 08:12:38 +00:00
Fathom - simple website analytics
2016-11-19 21:35:23 +00:00
==============================
2018-04-24 08:12:38 +00:00
[![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)
2016-12-11 14:23:11 +00:00
2018-06-08 11:18:00 +00:00
Fathom Analytics is a simpler and more privacy-focused alternative to Google Analytics.
2016-12-11 14:23:11 +00:00
2018-06-08 11:18:00 +00:00
Collecting information on the internet is important, but its broken. Weve become complacent in trading information for free access to web services, and then complaining when those web services do crappy things with that data.
The problem is this: _if we arent paying for the product, we are the product_.
Google Analytics may give you free access to their services but in turn, theyre assembling data profiles on your website visitors, which they can then use for better targeting of advertisements across their network.
We need to stop giving away our data and our users' privacy for free access to a tool.
2018-06-08 11:22:54 +00:00
Fathom respects the privacy of your users and does not collect any personally identifiable information. All while giving you the information you need about your site, so you can make smarter decisions about your design and content.
2016-11-24 15:49:30 +00:00
2018-06-08 14:00:40 +00:00
![Screenshot of the Fathom dashboard](https://github.com/usefathom/fathom/raw/master/assets/src/img/fathom.jpg?v=7)
## Installation
2018-05-29 13:46:45 +00:00
For getting a development version of Fathom up & running, go through the following steps.
1. Ensure you have [Golang](https://golang.org/doc/install#install) installed properly
1. Get code: `git clone https://github.com/usefathom/fathom.git $GOPATH/src/github.com/usefathom/fathom`
2018-05-29 13:46:45 +00:00
1. Compile into binary & prepare assets: `make build`
1. (Optional) Set your [custom configuration values](https://github.com/usefathom/fathom/wiki/Configuration-file).
1. Register your user account: `fathom register --email=<email> --password=<password>`
2018-05-14 12:11:52 +00:00
1. Start the webserver: `fathom server` and then visit **http://localhost:8080** to access your analytics dashboard.
2018-05-29 13:46:45 +00:00
To install and run Fathom in production, [have a look at the installation instructions](https://github.com/usefathom/fathom/wiki/Installing-&-running-Fathom).
2018-08-26 16:43:03 +00:00
## Docker
### Building
Ensure you have Docker installed and run `docker build -t fathom .`.
Run the container with `docker run -d -p 8080:8080 fathom`.
2018-08-26 16:43:03 +00:00
### Running
To run [our pre-built Docker image](https://hub.docker.com/r/usefathom/fathom/), run `docker run -d -p 8080:8080 usefathom/fathom:latest`
2018-08-26 16:43:03 +00:00
## Tracking snippet
2018-05-29 13:46:45 +00:00
To start tracking, include the following JavaScript on your site and replace `yourfathom.com` with the URL to your Fathom instance.
```html
2018-04-24 08:12:38 +00:00
<!-- Fathom - simple website analytics - https://github.com/usefathom/fathom -->
<script>
2018-04-24 08:12:38 +00:00
(function(f, a, t, h, o, m){
a[h]=a[h]||function(){
(a[h].q=a[h].q||[]).push(arguments)
};
2018-04-24 08:12:38 +00:00
o=f.createElement('script'),
m=f.getElementsByTagName('script')[0];
o.async=1; o.src=t; o.id='fathom-script';
2018-04-24 08:12:38 +00:00
m.parentNode.insertBefore(o,m)
})(document, window, '//yourfathom.com/tracker.js', 'fathom');
fathom('trackPageview');
</script>
2018-04-24 08:12:38 +00:00
<!-- / Fathom -->
```
2018-08-26 16:43:03 +00:00
### Content Security Policy
If you use a [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) to specify security policies for your website, Fathom requires the following CSP directives (replace `yourfathom.com` with the URL to your Fathom instance):
```
script-src: yourfathom.com;
img-src: yourfathom.com;
```
2018-04-24 16:24:55 +00:00
## Copyright and license
2018-04-24 16:24:55 +00:00
MIT licensed. Fathom and Fathom logo are trademarks of Fathom Analytics.