项目作者: frequencyanalytics

项目描述 :
Frequency Analytics - Open source private web analytics server
高级语言: HTML
项目地址: git://github.com/frequencyanalytics/frequency.git
创建时间: 2019-01-22T00:54:07Z
项目社区:https://github.com/frequencyanalytics/frequency

开源协议:MIT License

下载


Frequency Analytics - Open source private web analytics server

Frequency Analytics is an open source web analytics tool that tracks and reports website traffic to help you measure visits, referrals, and trends for your website. After installing Frequency Analytics, just add a snippet of javascript to every page of your website to enable tracking. The javascript tracking code runs when a user browses the page and sends visitor data to your private Frequency Analytics server.

Screenshot - Dashboard

Features

  • User Privacy
    • Host your own web analytics as an alternative to sharing your user data with third-party analytics services.
  • No Browser Cookies
    • The javascript tracking code does not rely on browser cookies.
  • No Data Limits
    • There are no artificial pageview limits. Track as many pageviews from as many websites as you want.
  • Daily Visitors
    • Daily visitors to your site over time.
  • Traffic Sources
    • Sources of traffic to your site by category: direct, search, social, and other.
  • Pageviews
    • Hits to each page on your site.
  • Referrers
    • Which websites are sending you the most traffic.
  • Platforms
    • Pageviews by user operating system.
  • Events
    • Detailed list of site events.
  • Single Sign-On (SSO) with SAML
    • Support for SAML providers like G Suite and Okta.

Run Frequency Analytics on Portal Cloud

Portal Cloud is a hosting service that enables anyone to run open source cloud applications.

Sign up for Portal Cloud and get $15 free credit.

Run Frequency Analytics on a VPS

Running Frequency Analytics on a VPS is designed to be as simple as possible.

  • Public Docker image
  • Single static Go binary with assets bundled
  • Automatic TLS using Let’s Encrypt
  • Redirects http to https
  • No database required

1. Get a server

Recommended Specs

  • Type: VPS or dedicated
  • Distribution: Ubuntu 16.04 (Xenial)
  • Memory: 512MB or greater

2. Add a DNS record

Create a DNS record for your domain that points to your server’s IP address.

Example: frequency.example.com A 172.x.x.x

3. Enable Let’s Encrypt

Frequency Analytics runs a TLS (“SSL”) https server on port 443/tcp. It also runs a standard web server on port 80/tcp to redirect clients to the secure server. Port 80/tcp is required for Let’s Encrypt verification.

Requirements

  • Your server must have a publicly resolvable DNS record.
  • Your server must be reachable over the internet on ports 80/tcp and 443/tcp.

Usage

Example usage:

  1. # Download the frequency binary.
  2. $ sudo wget -O /usr/bin/frequency https://github.com/frequencyanalytics/frequency/raw/master/frequency-linux-amd64
  3. # Make it executable.
  4. $ sudo chmod +x /usr/bin/frequency
  5. # Allow it to bind to privileged ports 80 and 443.
  6. $ sudo setcap cap_net_bind_service=+ep /usr/bin/frequency
  7. $ frequency --http-host frequency.example.com

Arguments

  1. -backlink string
  2. backlink (optional)
  3. -compress-old-files
  4. compress files for past days
  5. -cpuprofile file
  6. write cpu profile to file
  7. -datadir string
  8. data dir (default "/data")
  9. -debug
  10. debug mode
  11. -delete-old-files
  12. delete oldest files when storage exceeds 95% full (default true)
  13. -help
  14. display help and exit
  15. -http-host string
  16. HTTP host
  17. -memprofile file
  18. write mem profile to file
  19. -version
  20. display version and exit

Run as a Docker container

The official image is frequencyanalytics/frequency.

Follow the official Docker install instructions: Get Docker CE for Ubuntu

Make sure to change the --env FREQUENCY_HTTP_HOST to your publicly accessible domain name.

  1. # Your data directory must be bind-mounted as `/data` inside the container using the `--volume` flag.
  2. # Create a data directoy
  3. $ mkdir /data
  4. docker create \
  5. --name frequency \
  6. --restart always \
  7. --volume /data:/data \
  8. --network host \
  9. --env FREQUENCY_HTTP_HOST=frequency.example.com \
  10. frequencyanalytics/frequency:latest
  11. $ sudo docker start frequency
  12. $ sudo docker logs frequency
  13. <log output>

Updating the container image

Pull the latest image, remove the container, and re-create the container as explained above.

  1. # Pull the latest image
  2. $ sudo docker pull frequencyanalytics/frequency
  3. # Stop the container
  4. $ sudo docker stop frequency
  5. # Remove the container (data is stored on the mounted volume)
  6. $ sudo docker rm frequency
  7. # Re-create and start the container
  8. $ sudo docker create ... (see above)

Help / Reporting Bugs

Email support@portal.cloud