2016-11-19 21:35:23 +00:00
Ana. Open Source Web Analytics.
==============================
2016-12-11 14:23:11 +00:00
[![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)
2017-01-24 19:33:06 +00: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 15:49:30 +00:00
2016-12-05 16:16:14 +00:00
![Screenshot of the Ana dashboard ](https://github.com/dannyvankooten/ana/raw/master/assets/img/screenshot.png?v=6 )
2016-11-25 15:03:47 +00:00
2016-12-11 09:05:29 +00:00
## Installation
For getting a development version of Ana up & running, please go through the following steps.
1. Rename `.env.example` to `.env` and set your database credentials.
2017-01-09 20:07:41 +00:00
1. Create or migrate the database: `export $(cat .env | xargs) && $GOPATH/bin/migrate -url mysql://$ANA_DATABASE_USER:$ANA_DATABASE_PASSWORD@$ANA_DATABSE_HOST/$ANA_DATABASE_NAME -path ./db/migrations up`
3. Compile into binary: `make`
2017-01-24 19:30:32 +00:00
4. Create your user account: `ana register <email> <password>`
2016-12-11 09:05:29 +00:00
5. Run default Gulp task to build static assets: `gulp`
2017-01-24 19:30:32 +00:00
6. Start the webserver: `ana server --port=8080` & visit **localhost:8080** to access your analytics dashboard.
2016-12-11 09:05:29 +00:00
2016-12-25 16:27:39 +00: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 15:03:47 +00: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 08:16:43 +00:00
a.async=1; a.src=u;
2016-11-25 15:03:47 +00: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 09:05:29 +00:00
## License
MIT licensed.