Skip to content

Commit 9b1bfa0

Browse files
committed
Merge remote-tracking branch 'origin/master' into main-graph-v2-backend
2 parents 768da80 + 49e818d commit 9b1bfa0

18 files changed

Lines changed: 504 additions & 127 deletions

File tree

111 KB
Loading

.github/workflows/elixir.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ jobs:
5353
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5454
with:
5555
fetch-depth: 0
56+
filter: blob:none
5657

5758
- uses: marocchino/tool-versions-action@18a164fa2b0db1cc1edf7305fcb17ace36d1c306 # v1.2.0
5859
id: versions
@@ -152,6 +153,7 @@ jobs:
152153
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
153154
with:
154155
fetch-depth: 0
156+
filter: blob:none
155157

156158
- uses: marocchino/tool-versions-action@18a164fa2b0db1cc1edf7305fcb17ace36d1c306 # v1.2.0
157159
id: versions
@@ -266,6 +268,7 @@ jobs:
266268
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
267269
with:
268270
fetch-depth: 0
271+
filter: blob:none
269272

270273
- uses: marocchino/tool-versions-action@18a164fa2b0db1cc1edf7305fcb17ace36d1c306 # v1.2.0
271274
id: versions

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ All notable changes to this project will be documented in this file.
2525

2626
### Fixed
2727

28+
- Validate empty filter clauses list in Stats API v2
2829
- Fixed Stats API timeseries returning time buckets falling outside the queried range
2930
- Fixed issue with all non-interactive events being counted as interactive
3031
- Fixed countries map countries staying highlighted on Chrome

README.md

Lines changed: 65 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,50 +6,86 @@
66
</a>
77
</p>
88
<p align="center">
9-
<a href="https://plausible.io/simple-web-analytics">Simple Metrics</a> |
10-
<a href="https://plausible.io/lightweight-web-analytics">Lightweight Script</a> |
11-
<a href="https://plausible.io/privacy-focused-web-analytics">Privacy Focused</a> |
9+
<a href="https://plausible.io/plausible.io">Live Demo</a> |
1210
<a href="https://plausible.io/open-source-website-analytics">Open Source</a> |
1311
<a href="https://plausible.io/docs">Docs</a> |
1412
<a href="https://github.com/plausible/analytics/blob/master/CONTRIBUTING.md">Contributing</a>
1513
<br /><br />
1614
</p>
1715

18-
[Plausible Analytics](https://plausible.io/) is an easy to use, lightweight, 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 Community Edition or have us manage Plausible Analytics for you in the cloud. Here's [the live demo of our own website stats](https://plausible.io/plausible.io). Made and hosted in the EU 🇪🇺
16+
[Plausible Analytics](https://plausible.io/) is an open source, privacy-first web analytics tool. Lightweight, cookie-free [alternative to Google Analytics](https://plausible.io/blog/remove-google-analytics). Available in managed cloud or self-hosted community edition.
1917

20-
We are dedicated to making web analytics more privacy-friendly. Our mission is to reduce corporate surveillance by providing an alternative web analytics tool which doesn’t come from the AdTech world. We are completely independent and solely funded by our subscribers.
18+
- 🔐 [Privacy-focused](https://plausible.io/privacy-focused-web-analytics)
19+
- 🛡️ [GDPR, CCPA, PECR compliant](https://plausible.io/data-policy)
20+
- 📊 [Simple, fast dashboard](https://plausible.io/simple-web-analytics)
21+
- 🪶 [Lightweight script](https://plausible.io/lightweight-web-analytics)
22+
- 🇪🇺 [Made and hosted in the EU](https://plausible.io/eu-hosted-web-analytics)
2123

22-
![Plausible Analytics](https://plausible.io/docs/img/plausible-analytics.png)
24+
![Plausible Analytics](.github/plausible-analytics-dashboard.webp)
2325

2426
## Why Plausible?
2527

2628
Here's what makes Plausible a great Google Analytics alternative and why we're trusted by thousands of paying subscribers to deliver their website and business insights:
2729

28-
- **Clutter Free**: Plausible Analytics provides [simple web analytics](https://plausible.io/simple-web-analytics) and it cuts through the noise. No layers of menus, no need for custom reports. Get all the important insights on one single page. No training necessary.
29-
- **GDPR/CCPA/PECR compliant**: Measure traffic, not individuals. No personal data or IP addresses are ever stored in our database. We don't use cookies or any other persistent identifiers. [Read more about our data policy](https://plausible.io/data-policy)
30-
- **Lightweight**: Plausible Analytics works by loading a script on your website, like Google Analytics. Our script is [small](https://plausible.io/lightweight-web-analytics), making your website quicker to load. You can also send events directly to our [events API](https://plausible.io/docs/events-api).
31-
- **Email or Slack reports**: Keep an eye on your traffic with weekly and/or monthly email or Slack reports. You can also get traffic spike notifications.
32-
- **Invite team members and share stats**: You have the option to be transparent and open your web analytics to everyone. Your website stats are private by default but you can choose to make them public so anyone with your custom link can view them. You can [invite team members](https://plausible.io/docs/users-roles) and assign user roles too.
33-
- **Define key goals and track conversions**: Create custom events with custom dimensions to track conversions and attribution to understand and identify the trends that matter. Track ecommerce revenue, outbound link clicks, form completions, file downloads and 404 error pages. Increase conversions using funnel analysis.
34-
- **Search keywords**: Integrate your dashboard with Google Search Console to get the most accurate reporting on your search keywords.
35-
- **SPA support**: Plausible is built with modern web frameworks in mind and it works automatically with any pushState based router on the frontend. We also support frameworks that use the URL hash for routing. See [our documentation](https://plausible.io/docs/hash-based-routing).
36-
- **Smooth transition from Google Analytics**: There's a realtime dashboard, entry pages report and integration with Search Console. You can track your paid campaigns and conversions. You can invite team members. You can even [import your historical Google Analytics stats](https://plausible.io/docs/google-analytics-import) and there's [a Google Tag Manager template](https://plausible.io/gtm-template) too. Learn how to [get the most out of your Plausible experience](https://plausible.io/docs/your-plausible-experience) and join thousands who have already migrated from Google Analytics.
30+
- **Clutter-free**
31+
Plausible provides [simple web analytics](https://plausible.io/simple-web-analytics) that cut through the noise. No layers of menus or need to create custom reports. All key insights are on a single page, with no training required.
3732

38-
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://plausible.io/docs).
33+
- **Privacy-first and compliant**
34+
Measure traffic, not individuals. No personal data or IP addresses are stored, and no cookies or persistent identifiers are used. Fully compliant with GDPR, CCPA and PECR.
35+
[Read more about our data policy](https://plausible.io/data-policy)
36+
37+
- **Lightweight**
38+
Our script is [tiny](https://plausible.io/lightweight-web-analytics), helping your website load faster. You can also send events directly to our [events API](https://plausible.io/docs/events-api).
39+
40+
- **Built for modern workflows**
41+
Works with modern frameworks and supports SPAs out of the box, including pushState and hash-based routing. See [details](https://plausible.io/docs/hash-based-routing).
42+
43+
- **Define key goals and track conversions**
44+
Track goals, conversions, revenue attribution and funnels using custom events and dimensions. Turn on codeless tracking for outbound link clicks, form completions, file downloads and 404 error pages.
45+
46+
- **Easy reporting and sharing**
47+
Get weekly or monthly reports via email or Slack, including traffic spike/drop notifications. [Invite team members](https://plausible.io/docs/users-roles) with role-based access, share dashboards publicly or with anyone using a simple link. Make your analytics transparent by default.
48+
49+
- **Search insights included**
50+
Integrate with Google Search Console to get accurate keyword data directly in your dashboard.
51+
52+
- **API and integrations**
53+
Send events directly via our API and export your stats using the stats API or CSV. Build custom workflows and integrations on top of your data.
54+
55+
- **Real-time insights**
56+
Monitor live traffic and understand what’s happening on your site as it happens.
57+
58+
- **Smooth transition from Google Analytics**
59+
Familiar metrics, campaign tracking and Search Console integration. Import your historical Google Analytics stats and continue where you left off.
60+
61+
Thousands of teams use Plausible to understand their traffic without sacrificing privacy or simplicity. Learn how to [get the most out of your Plausible experience](https://plausible.io/docs/your-plausible-experience).
62+
63+
We are dedicated to making web analytics more privacy-friendly. Our mission is to reduce corporate surveillance by providing an alternative web analytics tool which doesn’t come from the AdTech world. We are completely independent and solely funded by our subscribers.
64+
65+
Interested to learn more? [Read more on our website](https://plausible.io), learn more about the team and our goals on [our about page](https://plausible.io/about) or explore [the documentation](https://plausible.io/docs).
3966

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

42-
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.
69+
Plausible is an independent, open source project funded entirely by our users. We charge a subscription to sustainably develop, maintain and improve the product over the long term.
70+
71+
Google Analytics is free to use because Google monetizes user data for advertising. That model comes with trade-offs: data collection, complexity and additional overhead for compliance and consent.
4372

44-
Google Analytics is free because Google has built their company and their wealth by collecting and analyzing huge amounts of personal information from web users and using these personal and behavioral insights to sell advertisements.
73+
With Plausible, the business model is simple:
4574

46-
Plausible has no part in that business model. No personal data is being collected and analyzed either. With Plausible, you 100% own and control all of your website data. This data is not being shared with or sold to any third-parties.
75+
- No data collection beyond aggregated, anonymized stats
76+
- No third-party data sharing
77+
- No advertising or tracking ecosystem
78+
- You fully own and control your data
4779

48-
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).
80+
We believe paying for analytics should be straightforward. You pay for a product, not with your users’ data, but with a transparent subscription. [Learn more](https://plausible.io/paid-analytics-vs-free-ga).
4981

5082
## Getting started with Plausible
5183

52-
The easiest way to get started with Plausible Analytics is with [our official managed service in the cloud](https://plausible.io/#pricing). It takes 2 minutes to start counting your stats with a worldwide CDN, high availability, backups, security and maintenance all done for you by us.
84+
The easiest way to get started with Plausible Analytics is with [our official managed service in the cloud](https://plausible.io/register).
85+
86+
- Takes ~2 minutes to set up
87+
- Global CDN, high availability, backups and security included
88+
- No maintenance required
5389

5490
In order to be compliant with the GDPR and the Schrems II ruling, all visitor data for our managed service in the cloud is exclusively processed on servers and cloud infrastructure owned and operated by European providers. Your website data never leaves the EU.
5591

@@ -78,8 +114,13 @@ Our only source of funding is our premium, managed service for running Plausible
78114

79115
## Technology
80116

81-
Plausible Analytics is a standard Elixir/Phoenix application backed by a PostgreSQL database for general data and a Clickhouse
82-
database for stats. On the frontend we use [TailwindCSS](https://tailwindcss.com/) for styling and React to make the dashboard interactive.
117+
Plausible is built with a modern, scalable stack:
118+
119+
- **Backend**: Elixir + Phoenix
120+
- **Databases**: PostgreSQL (general data), ClickHouse (analytics)
121+
- **Frontend**: React + [TailwindCSS](https://tailwindcss.com/)
122+
123+
Our architecture allows Plausible to handle large volumes of traffic efficiently while keeping the dashboard fast and responsive.
83124

84125
## Contributors
85126

@@ -91,7 +132,7 @@ For anyone wishing to contribute to Plausible, we recommend taking a look at [ou
91132

92133
We welcome feedback from our community. We have a public roadmap driven by the features suggested by the community members. Take a look at our [feedback board](https://plausible.io/feedback). Please let us know if you have any requests and vote on open issues so we can better prioritize.
93134

94-
To stay up to date with all the latest news and product updates, make sure to follow us on [X (formerly Twitter)](https://twitter.com/plausiblehq), [LinkedIn](https://www.linkedin.com/company/plausible-analytics/) or [Mastodon](https://fosstodon.org/@plausible).
135+
To stay up to date with all the latest news and product updates, make sure to follow us on [X (formerly Twitter)](https://twitter.com/plausiblehq), [Bluesky](https://bsky.app/profile/plausible.io), [LinkedIn](https://www.linkedin.com/company/plausible-analytics/) and [Mastodon](https://fosstodon.org/@plausible).
95136

96137
## License & Trademarks
97138

assets/js/dashboard/stats/graph/fetch-top-stats.test.ts

Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Metric } from '../../../types/query-api'
12
import {
23
DashboardState,
34
dashboardStateDefaultValue,
@@ -7,7 +8,7 @@ import { ComparisonMode, DashboardPeriod } from '../../dashboard-time-periods'
78
import { PlausibleSite, siteContextDefaultValue } from '../../site-context'
89
import { StatsQuery } from '../../stats-query'
910
import { remapToApiFilters } from '../../util/filters'
10-
import { chooseMetrics, MetricDef, topStatsQueries } from './fetch-top-stats'
11+
import { chooseMetrics, topStatsQueries } from './fetch-top-stats'
1112

1213
const aGoalFilter = ['is', 'goal', ['any goal']] as Filter
1314
const aPageFilter = ['is', 'page', ['/any/page']] as Filter
@@ -41,7 +42,7 @@ type TestCase = [
4142
Pick<DashboardState, 'filters' | 'period'> &
4243
Partial<{ site?: Pick<PlausibleSite, 'revenueGoals'> }>,
4344
/** expected metrics */
44-
MetricDef[],
45+
Metric[],
4546
/** expected queries */
4647
[StatsQuery, null | StatsQuery]
4748
]
@@ -50,10 +51,7 @@ const cases: TestCase[] = [
5051
[
5152
'realtime and goal filter',
5253
{ period: DashboardPeriod.realtime, filters: [aGoalFilter] },
53-
[
54-
{ key: 'visitors', label: 'Unique conversions (last 30 min)' },
55-
{ key: 'events', label: 'Total conversions (last 30 min)' }
56-
],
54+
['visitors', 'events'],
5755
[
5856
{
5957
date_range: DashboardPeriod.realtime_30m,
@@ -70,10 +68,7 @@ const cases: TestCase[] = [
7068
[
7169
'realtime',
7270
{ period: DashboardPeriod.realtime, filters: [] },
73-
[
74-
{ key: 'visitors', label: 'Unique visitors (last 30 min)' },
75-
{ key: 'pageviews', label: 'Pageviews (last 30 min)' }
76-
],
71+
['visitors', 'pageviews'],
7772
[
7873
{
7974
date_range: DashboardPeriod.realtime_30m,
@@ -100,11 +95,11 @@ const cases: TestCase[] = [
10095
}
10196
},
10297
[
103-
{ key: 'visitors', label: 'Unique conversions' },
104-
{ key: 'events', label: 'Total conversions' },
105-
{ key: 'total_revenue', label: 'Total revenue' },
106-
{ key: 'average_revenue', label: 'Average revenue' },
107-
{ key: 'conversion_rate', label: 'Conversion rate' }
98+
'visitors',
99+
'events',
100+
'total_revenue',
101+
'average_revenue',
102+
'conversion_rate'
108103
],
109104
[
110105
{
@@ -128,11 +123,7 @@ const cases: TestCase[] = [
128123
[
129124
'goal filter',
130125
{ period: aPeriodNotRealtime, filters: [aGoalFilter] },
131-
[
132-
{ key: 'visitors', label: 'Unique conversions' },
133-
{ key: 'events', label: 'Total conversions' },
134-
{ key: 'conversion_rate', label: 'Conversion rate' }
135-
],
126+
['visitors', 'events', 'conversion_rate'],
136127
[
137128
{
138129
date_range: aPeriodNotRealtime,
@@ -153,12 +144,12 @@ const cases: TestCase[] = [
153144
filters: [aPageFilter]
154145
},
155146
[
156-
{ key: 'visitors', label: 'Unique visitors' },
157-
{ key: 'visits', label: 'Total visits' },
158-
{ key: 'pageviews', label: 'Total pageviews' },
159-
{ key: 'bounce_rate', label: 'Bounce rate' },
160-
{ key: 'scroll_depth', label: 'Scroll depth' },
161-
{ key: 'time_on_page', label: 'Time on page' }
147+
'visitors',
148+
'visits',
149+
'pageviews',
150+
'bounce_rate',
151+
'scroll_depth',
152+
'time_on_page'
162153
],
163154

164155
[
@@ -185,12 +176,12 @@ const cases: TestCase[] = [
185176
'default',
186177
{ period: aPeriodNotRealtime, filters: [] },
187178
[
188-
{ key: 'visitors', label: 'Unique visitors' },
189-
{ key: 'visits', label: 'Total visits' },
190-
{ key: 'pageviews', label: 'Total pageviews' },
191-
{ key: 'views_per_visit', label: 'Views per visit' },
192-
{ key: 'bounce_rate', label: 'Bounce rate' },
193-
{ key: 'visit_duration', label: 'Visit duration' }
179+
'visitors',
180+
'visits',
181+
'pageviews',
182+
'views_per_visit',
183+
'bounce_rate',
184+
'visit_duration'
194185
],
195186
[
196187
{

0 commit comments

Comments
 (0)