2016-11-19 22:35:23 +01:00
Ana. Open Source Web Analytics.
==============================
2016-12-11 15:23:11 +01:00
[](https://goreportcard.com/report/github.com/dannyvankooten/ana)
[](https://raw.githubusercontent.com/dannyvankooten/ana/master/LICENSE)
2017-01-24 20:33:06 +01:00
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.
2016-11-24 16:49:30 +01:00
2018-04-20 13:13:09 +02:00

2016-11-25 16:03:47 +01:00
2016-12-11 10:05:29 +01:00
## Installation
For getting a development version of Ana up & running, please go through the following steps.
2017-08-11 14:23:27 +00:00
1. get code: `go get -u github.com/dannyvankooten/ana` (or `git clone` repo into your `$GOPATH` )
1. run `npm install` (in code directory) to install all required dependencies
2016-12-11 10:05:29 +01:00
1. Rename `.env.example` to `.env` and set your database credentials.
2017-08-11 14:23:27 +00:00
1. Compile into binary: `make`
1. Create your user account: `ana 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.
2016-12-11 10:05:29 +01:00
2016-12-25 18:27:39 +02:00
To start tracking, include the following JavaScript on your site and replace `ana.dev` with the URL to your Ana instance.
2016-11-25 16:03:47 +01:00
```html
<!-- Ana tracker -->
< script >
(function(d, w, u, o){
w[o]=w[o]||function(){
(w[o].q=w[o].q||[]).push(arguments)
};
a=d.createElement('script'),
m=d.getElementsByTagName('script')[0];
2016-12-08 09:16:43 +01:00
a.async=1; a.src=u;
2016-11-25 16:03:47 +01:00
m.parentNode.insertBefore(a,m)
})(document, window, '//ana.dev/tracker.js', 'ana');
ana('setTrackerUrl', '//ana.dev/collect');
ana('trackPageview');
< / script >
<!-- / Ana tracker -->
```
2016-12-11 10:05:29 +01:00
## License
MIT licensed.