Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
719b67e
Add nodejs to .tool-versions
ukutaht Dec 7, 2020
f883b55
Update README.md
metmarkosaric Dec 8, 2020
e94e728
Update README.md
metmarkosaric Dec 8, 2020
f7bd081
Update README.md
metmarkosaric Dec 8, 2020
e4f3325
Update elixir version for development
ukutaht Dec 8, 2020
e0ae954
Update README.md
metmarkosaric Dec 9, 2020
f59a8c6
Delete feature_request.md
metmarkosaric Dec 9, 2020
2064e35
Update bug_report.md
metmarkosaric Dec 9, 2020
838e954
Update bug_report.md
metmarkosaric Dec 10, 2020
54f7071
Add basic spike notifications
ukutaht Dec 9, 2020
11c9bdc
Make sure a notification is not sent again within 12 hours
ukutaht Dec 9, 2020
f9a7e0d
Remove unused schema functions
ukutaht Dec 9, 2020
f35ef2e
Add settings UI for spike notifications
ukutaht Dec 9, 2020
35e4051
Add more information to spike email
ukutaht Dec 11, 2020
49c3fa5
Improve email styling
ukutaht Dec 11, 2020
7f9525e
Only send sources when there are sources to send
ukutaht Dec 11, 2020
acce144
Show noref in notification email
ukutaht Dec 11, 2020
b8ab181
Add changelog entry
ukutaht Dec 11, 2020
1504dd5
Merge pull request #453 from plausible/spike-notifications
ukutaht Dec 11, 2020
f030699
Bump ini from 1.3.5 to 1.3.7 in /assets
dependabot[bot] Dec 11, 2020
39e90a2
Update spike email
ukutaht Dec 14, 2020
724b57f
Merge pull request #464 from plausible/dependabot/npm_and_yarn/assets…
ukutaht Dec 14, 2020
3142e8e
Add Appsignal instrumentation
ukutaht Dec 14, 2020
aa7ae87
Onboarding UX improvements (#441)
ukutaht Dec 15, 2020
9c4493d
Send welcome email after first site creation
ukutaht Dec 15, 2020
3524d13
Fix overly-sticky date in query parameters (#470)
maco Dec 15, 2020
a50fd55
Prevent choosing a date before site was added in datepicker (#477)
maco Dec 16, 2020
425975e
Adds dark mode to entire dashboard (#467)
Vigasaurus Dec 16, 2020
e98558f
Extends "logged_in" cookie to 5000 years (#485)
Vigasaurus Dec 17, 2020
d3f7c94
Adds "Load More" functionality to pages modal (#480)
Vigasaurus Dec 17, 2020
46e20b2
AppSignal (#452)
oliver-kriska Dec 17, 2020
5dcb329
Fix sessions bug (#496)
ukutaht Dec 21, 2020
df9767d
fix: low contrast text in dark mode (#490)
vincentdoerig Dec 21, 2020
1174801
Fixes couple of Flatpickr related issues (#495)
Vigasaurus Dec 21, 2020
b64f9de
Adds sticky header row (site selection, date, filters) (#472)
Vigasaurus Dec 22, 2020
b7827fe
Increase postmark timeout
ukutaht Dec 22, 2020
f776c6b
Improves realtime top stats and conversion rate calculation (#500)
Vigasaurus Dec 22, 2020
31ed9c0
Allows middle-click and ctrl+click outbound clicks to properly open a…
Vigasaurus Dec 22, 2020
49c4ec2
Encode site domain when redirecting a shared link
ukutaht Dec 22, 2020
e2599ff
Changes "This Month" view to Month-to-date for current month (#491)
Vigasaurus Dec 23, 2020
55ecbbe
Typo (#502)
Vigasaurus Dec 23, 2020
e95ff80
Add eslint, stylelint, prettier, and pre-commit (#484)
maco Dec 23, 2020
9f1eac0
Fixes calls to Query.shift_back/2
ukutaht Dec 23, 2020
ef4af92
Fix double quote handling in Clickhouse
ukutaht Dec 23, 2020
1a87013
Add ability to resend activation codes
ukutaht Dec 28, 2020
f9373e4
Convert datetime to date
ukutaht Dec 29, 2020
8174f1d
Mobile/Filter Overflow UX Improvements (#503)
Vigasaurus Dec 29, 2020
81c1288
Add elixir action (#526)
ukutaht Dec 29, 2020
d60d6d9
Remove travis config
ukutaht Dec 29, 2020
64a5b22
Add :ok return to spike notifier
ukutaht Dec 29, 2020
7f7552c
Add docker action (#530)
ukutaht Dec 29, 2020
2f2cfd3
Remove Travis badge
ukutaht Dec 29, 2020
333f358
Cache docker builds
ukutaht Dec 29, 2020
634c6fe
Update docker.yml
ukutaht Dec 29, 2020
324d33a
Update docker.yml
ukutaht Dec 29, 2020
9fe74af
Add workflows on stable
ukutaht Dec 29, 2020
364693d
Add branch name
ukutaht Dec 29, 2020
88f2d3b
Update docker workflow
ukutaht Dec 29, 2020
2f29bee
Update docker workflow
ukutaht Dec 29, 2020
bbb6bae
Adds fallback for countries missing in DataMap (#533)
Vigasaurus Dec 30, 2020
9bbaa75
Fix user deletion
ukutaht Dec 30, 2020
4ba5fb5
Add cache for user-agent strings (#547)
ukutaht Jan 4, 2021
4715c88
Remove warning
ukutaht Jan 5, 2021
267e404
Fix plan changes
ukutaht Jan 6, 2021
873fe1a
Add note about p.js
ukutaht Jan 7, 2021
650378f
Add CRM for admin emails (#557)
ukutaht Jan 7, 2021
ae42b86
Dialyzer and Credo checks (#558)
oliver-kriska Jan 7, 2021
229c51d
In app release notes (#554)
ukutaht Jan 7, 2021
27b6089
disable date navigation arrows when date is invalid for site (#483)
maco Jan 7, 2021
df99ef4
Fix build
ukutaht Jan 7, 2021
97df923
Do not allow logged out users to access crm
ukutaht Jan 7, 2021
f0fa483
Use marko's real email address for testing
ukutaht Jan 8, 2021
4fb7826
Add disabled hover state for buttons
ukutaht Jan 8, 2021
c4d7b5a
Fix user admin
ukutaht Jan 8, 2021
e692afc
Search sites by their members
ukutaht Jan 8, 2021
a5135d3
Add subscription info to admin panel
ukutaht Jan 8, 2021
c847839
Add title to admin
ukutaht Jan 8, 2021
34d5dfb
Add kaffy config to releases.exs
ukutaht Jan 8, 2021
564d07e
Show interval for free_10k
ukutaht Jan 8, 2021
e5ab45e
Fix layout issue on Safari
ukutaht Jan 11, 2021
4d4f8ba
Elixir & Docker upgrade (#566)
oliver-kriska Jan 13, 2021
e786af6
Fix session duration for out-of-order events (#593)
ukutaht Jan 13, 2021
6c8ae24
New config (#595)
ukutaht Jan 13, 2021
7d89514
Add test configuration
ukutaht Jan 13, 2021
563c8d9
Fix new configuration
ukutaht Jan 13, 2021
e873d79
Self hosted improvements (#603)
ukutaht Jan 15, 2021
b7a2b3b
Cascade deletion of site to spike notifications
ukutaht Jan 15, 2021
44fdef4
Add notice about www
ukutaht Jan 15, 2021
e7a7dee
Clarify that custom events are billed separately from events (#607)
ukutaht Jan 15, 2021
888a548
#497 UX improvement - show my sites cog without hover on small screen…
supersimple Jan 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
BASE_URL=http://localhost:8000
DATABASE_URL=postgres://postgres:postgres@127.0.0.1:5432/plausible_dev
CLICKHOUSE_DATABASE_URL=http://127.0.0.1:8123/plausible_dev
SECRET_KEY_BASE=/njrhntbycvastyvtk1zycwfm981vpo/0xrvwjjvemdakc/vsvbrevlwsc6u8rcg
DISABLE_SUBSCRIPTION=false
ENVIRONMENT=dev
MAILER_ADAPTER=Bamboo.LocalAdapter
LOG_LEVEL=debug
SELFHOST=false
11 changes: 11 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
DATABASE_URL=postgres://postgres:postgres@127.0.0.1:5432/plausible_test
CLICKHOUSE_DATABASE_URL=http://127.0.0.1:8123/plausible_test
SECRET_KEY_BASE=/njrhntbycvastyvtk1zycwfm981vpo/0xrvwjjvemdakc/vsvbrevlwsc6u8rcg
BASE_URL=http://localhost:8000
CRON_ENABLED=false
LOG_LEVEL=warn
ENVIRONMENT=test
MAILER_ADAPTER=Bamboo.TestAdapter
ADMIN_USER_EMAIL=admin@email.com
ADMIN_USER_PWD=fakepassword
SELFHOST=false
9 changes: 7 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@
name: Bug report
about: Create a report to help us improve Plausible Analytics
title: ''
labels: bug
assignees: ''

---

### Precheck

Please note that this tracker is only for bugs. Do not use the issue tracker for help or support. [Our docs](https://docs.plausible.io/) are a great place for most answers, but if you can’t find your answer there, you can [contact us](https://plausible.io/contact). Have an issue with your self-hosted install? You can ask in [our community forum](https://plausible.discourse.group/). Thanks!
Please note that this tracker is only for bugs. Do not use the issue tracker for help, support or feature requests.

[Our docs](https://docs.plausible.io/) are a great place for most answers, but if you can’t find your answer there, you can [contact us](https://plausible.io/contact).

Have a feature request? Please search the ideas [on our forum](https://github.com/plausible/analytics/discussions) to make sure that the feature has not yet been requested. If you cannot find what you had in mind, please [submit your feature request here](https://github.com/plausible/analytics/discussions/new).

Have an issue with your self-hosted install? You can ask in [our community forum](https://plausible.discourse.group/). Thanks!

## Prerequisites
- [ ] I have searched open and closed issues to make sure that the bug has not yet been reported.
Expand Down
25 changes: 0 additions & 25 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build

on:
push:
branches: [ master, stable ]

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch

-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: plausible/analytics:${{ steps.extract_branch.outputs.branch }}
cache-from: type=registry,ref=plausible/analytics:${{ steps.extract_branch.outputs.branch }}
cache-to: type=inline
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
70 changes: 70 additions & 0 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Elixir CI

on:
push:
branches: [master, stable]
pull_request:
branches: [master, stable]

jobs:
build:
name: Build and test
runs-on: ubuntu-latest

services:
postgres:
image: postgres:12
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5

clickhouse:
image: yandex/clickhouse-server:20
ports:
- 8123:8123
env:
options: >-
--health-cmd nc -zw3 localhost 8124
--health-interval 10s
--health-timeout 5s
--health-retries 5

steps:
- uses: actions/checkout@v2
- name: Read .tool-versions
uses: marocchino/tool-versions-action@v1
id: versions
- name: Set up Elixir
uses: actions/setup-elixir@v1
with:
elixir-version: ${{steps.versions.outputs.elixir}}
otp-version: ${{ steps.versions.outputs.erlang}}
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: |
deps
_build
priv/plts
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Check Formatting
run: mix format --check-formatted
- name: Check Compile Warnings
run: mix compile --warnings-as-errors --all-warnings
- name: Run tests
run: mix test
- name: Check Dialyzer
run: mix dialyzer
- name: Check Credo Warnings
run: mix credo --strict --only warning --ignore Consistency
env:
MIX_ENV: test
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ plausible-report.xml
.idea
*.iml
*.log
*.code-workspace
*.code-workspace

# Dializer
/priv/plts/*.plt
/priv/plts/*.plt.hash
28 changes: 28 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.2.1"
hooks:
- id: prettier
files: "assets/js|assets/css"
args: [--config, assets/.prettierrc.json]
- repo: https://github.com/awebdeveloper/pre-commit-stylelint
rev: 'f792d6b'
hooks:
- id: stylelint
additional_dependencies:
- stylelint@13.2.1
- stylelint-config-standard@20.0.0
- repo: https://github.com/pre-commit/mirrors-eslint
rev: 'v7.15.0'
hooks:
- id: eslint
files: "assets/js"
additional_dependencies:
- eslint@7.2.0
- eslint-config-airbnb@18.2.0
- eslint-plugin-import@2.22.1
- eslint-plugin-jsx-a11y@6.4.1
- eslint-plugin-react@7.21.5
- eslint-plugin-react-hooks@4.2.0
5 changes: 3 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
erlang 21.1
elixir 1.10.3
elixir 1.11.3-otp-23
erlang 23.2.1
nodejs 15.3.0
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# Changelog
All notable changes to this project will be documented in this file.

## [1.1.2] - Unreleased
## [1.2] - Unreleased

### Added
- Ability to add event metadata plausible/analytics#381
- Add tracker module to automatically track outbound links plausible/analytics#389
- Display weekday on the visitor graph plausible/analytics#175
- Collect and display browser & OS versions plausible/analytics#397
- Simple notifications around traffic spikes plausible/analytics#453
- Dark theme option/system setting follow plausible/analytics#467
- "Load More" capability to pages modal plausible/analytics#480
- Unique Visitors (last 30 min) as a top stat in realtime view plausible/analytics#500
- Pinned filter and date selector rows while scrolling plausible/analytics#472

### Changed
- Use alpine as base image to decrease Docker image size plausible/analytics#353
Expand All @@ -17,13 +22,25 @@ All notable changes to this project will be documented in this file.
- Validate domain format on site creation plausible/analytics#427
- Improve settings UX and design plausible/analytics#412
- Improve site listing UX and design plausible/analytics#438
- Improve onboarding UX and design plausible/analytics#441
- Allows outbound link tracking script to use new tab redirection plausible/analytics#494
- "This Month" view is now Month-to-date for the current month plausible/analytics#491
- My sites now show settings cog at all times on smaller screens plausible/analytics#497
- Background jobs are enabled by default for self-hosted installations plausible/analytics#603
- All new users on self-hosted installations have a never-ending trial plausible/analytics#603

### Fixed
- Do not error when activating an already activated account plausible/analytics#370
- Ignore arrow keys when modifier keys are pressed plausible/analytics#363
- Show correct stats when goal filter is combined with source plausible/analytics#374
- Going back in history now correctly resets the period filter plausible/analytics#408
- Fix URL decoding in query parameters plausible/analytics#416
- Fix overly-sticky date in query parameters plausible/analytics/#439
- Prevent picking dates before site insertion plausible/analtics#446
- Fix overly-sticky from and to in query parameters plausible/analytics#495
- Adds support for single-day date selection plausible/analytics#495
- Goal conversion rate in realtime view is now accurate plausible/analytics#500
- Various UI/UX issues plausible/analytics#503

### Security
- Do not run the plausible Docker container as root plausible/analytics#362
Expand Down
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# platform specific, it makes sense to build it in the docker

#### Builder
FROM elixir:1.10.4-alpine as buildcontainer
FROM hexpm/elixir:1.11.3-erlang-23.2.1-alpine-3.12.1 as buildcontainer

# preparation
ARG APP_VER=0.0.1
Expand All @@ -14,16 +14,16 @@ RUN mkdir /app
WORKDIR /app

# install build dependencies
RUN apk add --no-cache git nodejs yarn python npm ca-certificates wget gnupg make erlang gcc libc-dev && \
RUN apk add --no-cache git nodejs yarn python3 npm ca-certificates wget gnupg make erlang gcc libc-dev && \
npm install npm@latest -g && \
npm install -g webpack

COPY mix.exs ./
COPY mix.lock ./
RUN mix local.hex --force && \
mix local.rebar --force && \
mix deps.get --only prod && \
mix deps.compile
mix local.rebar --force && \
mix deps.get --only prod && \
mix deps.compile

COPY assets/package.json assets/package-lock.json ./assets/
COPY tracker/package.json tracker/package-lock.json ./tracker/
Expand All @@ -47,10 +47,12 @@ COPY rel rel
RUN mix release plausible

# Main Docker Image
FROM alpine:3.11
FROM alpine:3.12.1
LABEL maintainer="tckb <tckb@tgrthi.me>"
ENV LANG=C.UTF-8

RUN apk update && apk upgrade

RUN apk add --no-cache openssl ncurses

COPY .gitlab/build-scripts/docker-entrypoint.sh /entrypoint.sh
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Plausible Analytics

[![Build Status](https://travis-ci.org/plausible/analytics.svg?branch=master)](https://travis-ci.org/plausible/analytics)

[Plausible Analytics](https://plausible.io/) is a simple, lightweight (< 1 KB), open-source and privacy-friendly alternative to Google Analytics. It doesn’t use cookies and is fully compliant with GDPR, CCPA and PECR. You can self-host Plausible or have us run it for you in the Cloud. Here's [the live demo of our own website stats](https://plausible.io/plausible.io). We are completely independent, self-funded and bootstrapped. Made and hosted in the EU 🇪🇺

![](https://docs.plausible.io/img/plausible-analytics.png)
Expand All @@ -19,10 +17,6 @@

Interested to learn more? [Read more on our website](https://plausible.io), learn more about the team and the goals of the project on [our about page](https://plausible.io/about) or explore [the documentation](https://docs.plausible.io).

### Can Plausible Analytics be self-hosted?

Yes, Plausible is fully [open source web analytics](https://plausible.io/open-source-website-analytics). We have a free as in beer Plausible Analytics Self-Hosted solution. It’s exactly the same product as our Cloud solution, only the self-hosted version you have to install, host and manage yourself on your own server. Take a look at our [self-hosting installation instructions](https://docs.plausible.io/self-hosting).

### Why is Plausible Analytics Cloud not free like Google Analytics?

Plausible Analytics is an independently owned and actively developed project. To keep the project development going, to stay in business, to continue putting effort into building a better product and to cover our costs, we need to charge a fee.
Expand All @@ -33,6 +27,14 @@ Plausible has no part in that business model. No personal data is being collecte

We choose the subscription business model rather than the business model of surveillance capitalism. See reasons why we believe you should [stop using Google Analytics on your website](https://plausible.io/blog/remove-google-analytics).

### Can Plausible Analytics be self-hosted?

Yes, Plausible is fully [open source web analytics](https://plausible.io/open-source-website-analytics).

We have a free as in beer [Plausible Analytics Self-Hosted](https://plausible.io/self-hosted-web-analytics) solution. It’s exactly the same product as our Cloud solution with a less frequent release schedule. The difference is that the self-hosted version you have to install, host and manage yourself on your own infrastructure while the Cloud version we manage everything for your ease and convenience. Take a look at our [self-hosting installation instructions](https://docs.plausible.io/self-hosting).

Plausible Self-Hosted is a community supported project and there are no guarantees that you will get support from the creators of Plausible to troubleshoot your self-hosting issues. There is a [community supported forum](https://github.com/plausible/analytics/discussions?discussions_q=category%3A%22Self-Hosted+Support%22) where you can ask for help. And if you [become a sponsor](https://github.com/sponsors/plausible), you can [reach out to us](https://plausible.io/contact) and get equal support to all the other paying customers.

### Technology

Plausible Analytics is a standard Elixir/Phoenix application backed by a PostgreSQL database for general data and a Clickhouse
Expand Down
Loading