10 |
--------------------------------------------------------------------------------
/docs/plausible-analytics-self-hosted-guides.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Plausible Community Edition (CE)
3 | ---
4 |
5 | Plausible Community Edition (CE) is our "free as in beer", self-hosted and AGPL-licensed release. Check out the [getting started guide to self-hosting Plausible Community Edition](https://github.com/plausible/community-edition/).
6 |
7 | Here's the complete overview of differences between [Plausible Analytics managed hosting in the cloud and Plausible CE](https://plausible.io/self-hosted-web-analytics).
8 |
--------------------------------------------------------------------------------
/src/js/apiv2-examples/filtering-case-insensitive-response.json:
--------------------------------------------------------------------------------
1 | {
2 | "results": [{"metrics": [10], "dimensions": []}],
3 | "meta": {},
4 | "query": {
5 | "site_id": "dummy.site",
6 | "metrics": ["visitors"],
7 | "date_range": ["2024-09-04T00:00:00+00:00", "2024-09-10T23:59:59+00:00"],
8 | "filters": [
9 | ["contains", "event:page", ["/blog"], {"case_sensitive": false}]
10 | ],
11 | "dimensions": [],
12 | "order_by": [["visitors", "desc"]],
13 | "include": {}
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/docs/stats-api-playground.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Stats API playground
3 | ---
4 |
5 | import { ApiV2Playground, ExamplesTip } from '../src/js/apiv2-playground.tsx';
6 | import { SiteContextProvider } from '../src/js/sites.tsx';
7 |
8 |
10 |
--------------------------------------------------------------------------------
/src/js/apiv2-examples/behavioral-filters-response.json:
--------------------------------------------------------------------------------
1 | {
2 | "results": [{"metrics": [456], "dimensions": []}],
3 | "meta": {},
4 | "query": {
5 | "site_id": "dummy.site",
6 | "metrics": ["visitors"],
7 | "date_range": ["2022-09-23T00:00:00+03:00", "2025-04-07T23:59:59+03:00"],
8 | "filters": [
9 | ["is", "event:goal", ["Signup"]],
10 | ["has_done", ["is", "event:page", ["/pricing"]]]
11 | ],
12 | "dimensions": [],
13 | "order_by": [["visitors", "desc"]],
14 | "include": {},
15 | "pagination": {"offset": 0, "limit": 10000}
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/static/js/tracking.js:
--------------------------------------------------------------------------------
1 | var scriptSrc = "https://plausible.io/js/pa-6_srOGVV9SLMWJ1ZpUAbG.js"
2 |
3 | window.plausible=window.plausible||function(){(window.plausible.q=window.plausible.q||[]).push(arguments)},window.plausible.init=function(i){window.plausible.o=i||{}};var script=document.createElement("script");script.type="text/javascript",script.defer=!0,script.src=scriptSrc;var r=document.getElementsByTagName("script")[0];r.parentNode.insertBefore(script,r);
4 |
5 | plausible.init({
6 | customProperties: {
7 | browser_language: navigator.language || navigator.userLanguage
8 | }
9 | })
10 |
--------------------------------------------------------------------------------
/src/js/api-helpers.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export const Required = () => (
4 |
12 | REQUIRED
13 |
14 | );
15 |
16 | export const Optional = () => (
17 |
25 | optional
26 |
27 | );
28 |
29 |
30 |
--------------------------------------------------------------------------------
/src/js/apiv2-examples/filtering-by-segment-response.json:
--------------------------------------------------------------------------------
1 | {
2 | "results": [{"metrics": [0, 0], "dimensions": []}],
3 | "meta": {},
4 | "query": {
5 | "site_id": "dummy.site",
6 | "metrics": ["visitors", "events"],
7 | "date_range": ["2025-02-27T00:00:00+00:00", "2025-03-05T23:59:59+00:00"],
8 | "filters": [
9 | ["has_not_done", ["is", "event:goal", ["Signup"]]],
10 | ["is", "visit:source", ["opensource.com"]]
11 | ],
12 | "dimensions": [],
13 | "order_by": [["visitors", "desc"]],
14 | "include": {},
15 | "pagination": {"offset": 0, "limit": 10000}
16 | }
17 | }
--------------------------------------------------------------------------------
/docs/delete-account.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Delete your account
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | Log in to your Plausible Analytics account and in the top right menu, click on your account name and choose "**Account Settings**" to enter your account settings.
8 |
9 | To delete your Plausible Analytics account, go to the "**Danger Zone**" section, find "**Delete Account**" and click on the big red "**Delete Account**" button. Deleting your account removes all the sites and stats you've collected.
10 |
11 |
12 |
--------------------------------------------------------------------------------
/docs/cancel-subscription.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Cancel your subscription plan
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | Log in to your Plausible Analytics account and in the top right menu, click on your account name and choose "**Account Settings**" to enter your account settings.
8 |
9 | To cancel your subscription plan, go to the "**Subscription**" section and click on "**Cancel my subscription**".
10 |
11 | After canceling, the stats will keep being counted, and you will have access to your stats until the end of your subscription period.
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/js/apiv2-examples/filtering-basics-response.json:
--------------------------------------------------------------------------------
1 | {
2 | "results": [{"metrics": [10], "dimensions": []}],
3 | "meta": {},
4 | "query": {
5 | "site_id": "dummy.site",
6 | "metrics": ["visitors"],
7 | "date_range": ["2024-09-04T00:00:00+00:00", "2024-09-10T23:59:59+00:00"],
8 | "filters": [
9 | ["contains", "event:page", ["/docs", "/pricing"]],
10 | [
11 | "or",
12 | [
13 | ["not", ["is", "visit:utm_campaign", ["Referral"]]],
14 | ["is", "visit:country_name", ["Estonia", "United States of America"]]
15 | ]
16 | ]
17 | ],
18 | "dimensions": [],
19 | "order_by": [["visitors", "desc"]],
20 | "include": {}
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/js/apiv2-examples/imports-response.json:
--------------------------------------------------------------------------------
1 | {
2 | "results": [
3 | {"metrics": [91349], "dimensions": ["Direct / None"]},
4 | {"metrics": [90901], "dimensions": ["Twitter"]},
5 | {"metrics": [90265], "dimensions": ["Facebook"]},
6 | {"metrics": [89511], "dimensions": ["Google"]},
7 | {"metrics": [89243], "dimensions": ["DuckDuckGo"]}
8 | ],
9 | "meta": {"imports_included": true},
10 | "query": {
11 | "site_id": "dummy.site",
12 | "metrics": ["visitors"],
13 | "date_range": ["2021-09-26T00:00:00+00:00", "2024-09-10T23:59:59+00:00"],
14 | "filters": [],
15 | "dimensions": ["visit:source"],
16 | "order_by": [["visitors", "desc"]],
17 | "include": {"imports": true}
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/js/apiv2-examples/pagination-response.json:
--------------------------------------------------------------------------------
1 | {
2 | "results": [
3 | {"metrics": [325, 397, 317], "dimensions": ["(not set)", "duckduckgo"]},
4 | {"metrics": [311, 369, 295], "dimensions": ["(not set)", "google"]},
5 | {"metrics": [296, 357, 292], "dimensions": ["social", "twitter"]}
6 | ],
7 | "meta": {"total_rows": 6},
8 | "query": {
9 | "site_id": "dummy.site",
10 | "metrics": ["visitors", "events", "pageviews"],
11 | "date_range": ["2024-09-10T00:00:00+00:00", "2024-09-16T23:59:59+00:00"],
12 | "filters": [],
13 | "dimensions": ["visit:utm_medium", "visit:utm_source"],
14 | "order_by": [["visitors", "desc"]],
15 | "include": {"total_rows": true},
16 | "pagination": {"offset": 1, "limit": 3}
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/js/apiv2-examples/revenue-warning-response.json:
--------------------------------------------------------------------------------
1 | {
2 | "results": [
3 | {"metrics": [null], "dimensions": ["PurchaseUSD"]}
4 | ],
5 | "meta": {
6 | "metric_warnings": {
7 | "total_revenue": {
8 | "code": "no_single_revenue_currency",
9 | "warning": "Revenue metrics are null as there are multiple currencies for the selected event:goals."
10 | }
11 | }
12 | },
13 | "query": {
14 | "site_id": "dummy.site",
15 | "metrics": ["total_revenue"],
16 | "date_range": ["2021-12-14T00:00:00+00:00", "2024-12-11T23:59:59+00:00"],
17 | "filters": [["is", "event:goal", ["PurchaseUSD", "PurchaseEUR"]]],
18 | "dimensions": [],
19 | "order_by": [["total_revenue", "desc"]],
20 | "include": {},
21 | "pagination": {"offset": 0, "limit": 10000}
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/docs/dashboard-appearance.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Choose between dark or light theme
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | Plausible Analytics supports both light and dark design themes. We follow your system theme by default but logged in users can manually choose either system, dark or light theme in the account settings.
8 |
9 | Log in to your Plausible Analytics account and in the top right menu, click on your account name and choose "**Account Settings**" to enter your account settings.
10 |
11 | To change your Plausible Analytics theme, go to the "**Preferences**" section, find "**Dashboard Appearance**", choose your preferred theme and click on the "**Change Theme**" button.
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/js/apiv2-examples/revenue-metrics-response.json:
--------------------------------------------------------------------------------
1 | {
2 | "results": [
3 | {
4 | "dimensions": ["North America Purchases"],
5 | "metrics": [
6 | {
7 | "short": "$96.3M",
8 | "value": 96336315,
9 | "long": "$96,336,315.00",
10 | "currency": "USD"
11 | }
12 | ]
13 | },
14 | {
15 | "dimensions": ["Visit /"],
16 | "metrics": [null]
17 | }
18 | ],
19 | "meta": {},
20 | "query": {
21 | "site_id": "dummy.site",
22 | "metrics": ["total_revenue"],
23 | "date_range": ["2021-12-14T00:00:00+00:00", "2024-12-11T23:59:59+00:00"],
24 | "filters": [],
25 | "dimensions": ["event:goal"],
26 | "order_by": [["total_revenue", "desc"]],
27 | "include": {},
28 | "pagination": {"offset": 0, "limit": 10000}
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/docs/mediawiki-integration.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: How to add Plausible to your MediaWiki instance
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | You can add the Plausible Analytics tracking code to your MediaWiki instance by downloading and activating the [Plausible](https://github.com/octfx/mediawiki-extension-Plausible) extension.
8 |
9 | Clone `https://github.com/octfx/mediawiki-extension-Plausible` to your `/extensions` folder:
10 |
11 | ```shell
12 | git clone https://github.com/octfx/mediawiki-extension-Plausible extensions/Plausible
13 | ```
14 |
15 | Add `wfLoadExtension( 'Plausible' );` to your `LocalSettings.php`.
16 |
17 | Configure as needed.
18 |
19 | A more expanded integration document can be found at the extensions [README.md](https://github.com/octfx/mediawiki-extension-Plausible/blob/master/README.md)
20 |
--------------------------------------------------------------------------------
/docs/authors.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Our team
3 | ---
4 |
5 | Plausible Analytics is designed, developed and maintained by the following people:
6 |
7 | ## Core team
8 |
9 | * [Uku Taht](https://twitter.com/ukutaht) - Design and development
10 | * [Marko Saric](https://twitter.com/markosaric) - Marketing and communication
11 | * Robert - Product engineer
12 | * Cenk - Infrastructure and security
13 | * Adam - Product engineer and infrastructure
14 | * Bogdan - Customer success
15 | * Adrian - Product engineer
16 | * Hricha - Content and community
17 | * Artur - Product engineer
18 | * Sanne - Product designer
19 |
20 | ## Regular contributors
21 |
22 | * Daan - WordPress plugin
23 | * Greg - Connectors and integrations
24 |
25 | Special thanks to the community contributors who build and maintain [integrations with various frameworks](integration-guides.md).
26 |
--------------------------------------------------------------------------------
/docs/website-settings.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Your website settings section
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | You can access your website settings using these two methods:
8 |
9 | ## Directly from your site dashboard
10 |
11 | Click on your site name in the top left side of your Plausible Analytics dashboard and select "**Site Settings**" in the dropdown menu.
12 |
13 |
14 |
15 | ## From your Plausible Analytics landing page
16 |
17 | Hover over your website name and click on the "**Settings**" icon on the right hand side of your domain name in your [Plausible Analytics account landing page](https://plausible.io/sites) to enter your website settings section.
18 |
19 |
20 |
--------------------------------------------------------------------------------
/docs/general.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Change your reporting timezone
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | Within the "**General**" section of your website settings you can change the timezone for your reports in the "**Site timezone**" field. This sets the day boundary of your reports regardless of where your traffic is coming from.
8 |
9 | For instance, if you select "**(GMT+01:00) Amsterdam, Berlin…**" then the beginning and the end of each day of your reporting is calculated based on the time in Amsterdam, even if your visitors come from London or New York.
10 |
11 | The best practice is to set the timezone that reflects the location of your audience or if the audience is very broad and spread across the world to set the timezone of your location.
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/js/apiv2-examples/timeseries-response.json:
--------------------------------------------------------------------------------
1 | {
2 | "results": [
3 | {"metrics": [129, 144], "dimensions": ["2024-09-04"]},
4 | {"metrics": [65, 68], "dimensions": ["2024-09-05"]},
5 | {"metrics": [72, 78], "dimensions": ["2024-09-06"]},
6 | {"metrics": [94, 98], "dimensions": ["2024-09-07"]},
7 | {"metrics": [44, 49], "dimensions": ["2024-09-08"]},
8 | {"metrics": [14, 14], "dimensions": ["2024-09-09"]},
9 | {"metrics": [12, 12], "dimensions": ["2024-09-10"]}
10 | ],
11 | "meta": {},
12 | "query": {
13 | "site_id": "dummy.site",
14 | "metrics": ["visitors", "events"],
15 | "date_range": ["2024-09-04T00:00:00+00:00", "2024-09-10T23:59:59+00:00"],
16 | "filters": [["is", "visit:os", ["GNU/Linux", "Mac"]]],
17 | "dimensions": ["time:day"],
18 | "order_by": [["time:day", "asc"], ["visitors", "desc"]],
19 | "include": {}
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/js/apiv2-examples/utm-response.json:
--------------------------------------------------------------------------------
1 | {
2 | "results": [
3 | {"metrics": [320, 382, 297], "dimensions": ["(not set)", "duckduckgo"]},
4 | {"metrics": [302, 363, 296], "dimensions": ["social", "twitter"]},
5 | {"metrics": [293, 342, 280], "dimensions": ["social", "facebook"]},
6 | {"metrics": [288, 345, 292], "dimensions": ["(not set)", "google"]},
7 | {"metrics": [169, 185, 147], "dimensions": ["(not set)", "(not set)"]},
8 | {"metrics": [159, 180, 153], "dimensions": ["email", "(not set)"]}
9 | ],
10 | "meta": {},
11 | "query": {
12 | "site_id": "dummy.site",
13 | "metrics": ["visitors", "events", "pageviews"],
14 | "date_range": ["2024-09-04T00:00:00+00:00", "2024-09-10T23:59:59+00:00"],
15 | "filters": [],
16 | "dimensions": ["visit:utm_medium", "visit:utm_source"],
17 | "order_by": [["visitors", "desc"]],
18 | "include": {}
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/js/apiv2-examples/country-and-city-response.json:
--------------------------------------------------------------------------------
1 | {
2 | "results": [
3 | {"metrics": [99, 98, 94], "dimensions": ["Estonia", "Tallinn"]},
4 | {"metrics": [98, 82, 97], "dimensions": ["Brazil", "São Paulo"]},
5 | {"metrics": [97, 77, 98], "dimensions": ["Germany", "Berlin"]},
6 | {"metrics": [94, 86, 93], "dimensions": ["Italy", "Rome"]},
7 | {"metrics": [89, 77, 96], "dimensions": ["United States", "San Francisco"]},
8 | {"metrics": [82, 78, 92], "dimensions": ["Poland", "Warsaw"]}
9 | ],
10 | "meta": {},
11 | "query": {
12 | "site_id": "dummy.site",
13 | "metrics": ["visitors", "pageviews", "bounce_rate"],
14 | "date_range": ["2024-09-04T00:00:00+00:00", "2024-09-10T23:59:59+00:00"],
15 | "filters": [["is_not", "visit:country_name", [""]]],
16 | "dimensions": ["visit:country_name", "visit:city_name"],
17 | "order_by": [["visitors", "desc"]],
18 | "include": {}
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/docs/login-management.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Login management
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | Plausible Analytics offers a security feature that allows you to remotely log out of your account on other devices via your account settings.
8 |
9 |
10 |
11 | ## How to log out of your Plausible account remotely
12 |
13 | * Log in to your Plausible Analytics account and in the top right menu, click on your account name and choose "**Account Settings**" to enter your account settings.
14 | * In the "**Security**" section, find “**Login Management**” where you can see a list of all your active logged-in sessions.
15 | * Click the trash icon next to the session you wish to end.
16 |
17 | Note that all Plausible logged-in sessions automatically expire after 14 days of inactivity.
18 |
19 | You can also enable [two-factor authentication (2FA)](2fa.md) as an extra security layer for your Plausible account.
20 |
--------------------------------------------------------------------------------
/src/js/apiv2-examples/imports-bad-filter-response.json:
--------------------------------------------------------------------------------
1 | {
2 | "results": [
3 | {"metrics": [1192], "dimensions": ["Google"]},
4 | {"metrics": [1191], "dimensions": ["Direct / None"]},
5 | {"metrics": [1189], "dimensions": ["DuckDuckGo"]},
6 | {"metrics": [1186], "dimensions": ["Facebook"]},
7 | {"metrics": [1185], "dimensions": ["Twitter"]}
8 | ],
9 | "meta": {
10 | "imports_included": false,
11 | "imports_skip_reason": "unsupported_query",
12 | "imports_warning": "Imported stats are not included in the results because query parameters are not supported. For more information, see: https://plausible.io/docs/stats-api#filtering-imported-stats"
13 | },
14 | "query": {
15 | "site_id": "dummy.site",
16 | "metrics": ["visitors"],
17 | "date_range": ["2021-09-26T00:00:00+00:00", "2024-09-10T23:59:59+00:00"],
18 | "filters": [["is", "visit:country_name", ["Estonia"]]],
19 | "dimensions": ["visit:source"],
20 | "order_by": [["visitors", "desc"]],
21 | "include": {"imports": true}
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/docs/visibility.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Open up your website stats to the public
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | Within the "**Visibility**" section of your website settings you can choose to be transparent and make your website stats public so anyone with your stats dashboard link can view them.
8 |
9 | Your website stats are private by default. Making them public will give you access to your public stats dashboard URL, so you can share it with the world. Some website owners link to their public stats dashboard from their footer or their "**About**" page. It's really up to you.
10 |
11 | Switch this on to make your website stats public and get access to your public stats dashboard URL. Like this:
12 |
13 |
14 |
15 | ## Want to make your stats private again?
16 |
17 | If you wish to make your website stats private again, switch it off. Your stats dashboard URL will become private again. Like this:
18 |
19 |
20 |
--------------------------------------------------------------------------------
/docs/email-reports.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Set reports to be sent through email
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | Within the "**Email reports**" section of your website settings you can decide to enable weekly (every Monday) and/or monthly (every 1st day of the month) reports to be sent directly through email.
8 |
9 | All the stats are embedded directly into the email and there's no need to go to the Plausible Analytics website to view them. There are no attachments, no PDFs and no links to click on in the email reports either.
10 |
11 |
12 |
13 | ## Set email reports to be sent to multiple recipients
14 |
15 | Email reports can be set to be sent to multiple recipients. Enable the weekly and/or monthly report, add an individual recipient into the "**Report recipients**" field and click on the "**Add recipient**" button.
16 |
17 | You can set the email reports to be sent to as many people as you want. You can remove individual report recipients or completely stop the scheduled email reports at any time.
18 |
--------------------------------------------------------------------------------
/src/js/apiv2-examples/response-meta.json:
--------------------------------------------------------------------------------
1 | {
2 | // Whether imported data was included
3 | // Only set if include.imports was set
4 | "imports_included": false,
5 |
6 | // Information about why including imported data failed
7 | "imports_skip_reason": "unsupported_interval",
8 | "imports_warning": "Imported stats are not included because the time dimension (i.e. the interval) is too short.",
9 |
10 | // Warnings about specific metrics
11 | // Currently only set if a revenue metric was used and was unable to be calculated
12 | "metric_warnings": {
13 | "total_revenue": {
14 | "code": "no_revenue_goals_matching",
15 | "warning": "Revenue metrics are null as there are no matching revenue goals."
16 | }
17 | },
18 |
19 | // Only set if include.time_labels was set
20 | "time_labels": [
21 | "2024-09-10 00:00:00",
22 | "2024-09-10 01:00:00",
23 | "2024-09-10 02:00:00",
24 | "2024-09-10 03:00:00",
25 | "2024-09-10 04:00:00",
26 | "2024-09-10 05:00:00",
27 | "2024-09-10 06:00:00"
28 | ],
29 |
30 | // Only set if include.total_rows was set
31 | "total_rows": 342
32 | }
33 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Website
2 |
3 | This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.
4 |
5 | ### Installation
6 |
7 | ```bash
8 | npm install
9 | ```
10 |
11 | ### Local Development
12 |
13 | ```bash
14 | npm run start
15 | ```
16 |
17 | This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
18 |
19 | To run alongside [plausible/analytics](https://github.com/plausible/analytics/), also run caddy in a different terminal:
20 |
21 | ```bash
22 | caddy run --config Caddyfile
23 | ```
24 |
25 | Docs are served on localhost:8001/docs in that case.
26 |
27 | ### Build
28 |
29 | ```bash
30 | $ npm run build
31 | ```
32 |
33 | This command generates static content into the `build` directory and can be served using any static contents hosting service.
34 |
35 | ### Deployment
36 |
37 | ```bash
38 | $ GIT_USER=
19 |
--------------------------------------------------------------------------------
/docs/wix-integration.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: How to add the script to your Wix site
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | You can use the "**[Tracking Tools](https://support.wix.com/en/article/embedding-custom-code-to-your-site)**" feature to add Plausible Analytics tracking code to your Wix website same way you would add Google Analytics code or any other JavaScript code.
8 |
9 | Site-wide JavaScript code injection is a premium Wix feature so you need to upgrade your Wix account to a paid subscription plan.
10 |
11 | * In your site's dashboard, click on "**Settings**", and in "**Tracking Tools**" click on "**Manage**".
12 |
13 | * Click on the "**+ New Tool**" button and select "**Custom**".
14 |
15 | * Paste your Plausible tracking code, choose which pages to add the code to ("**All Pages**"), select to "**Load code once**" ([read more about this here](https://support.wix.com/en/article/custom-code-loading-options)), select "**Head**" as the place for the code and click on the "**Apply**" button.
16 |
17 | Now you can go to your website and verify whether Plausible Analytics script has been added and to your Plausible Analytics account to see whether the stats are being tracked. See here [how to verify the integration](troubleshoot-integration.md).
18 |
--------------------------------------------------------------------------------
/.github/workflows/docusaurus.yml:
--------------------------------------------------------------------------------
1 | name: Docusaurus site CI
2 |
3 | on:
4 | push:
5 | branches: [ master, upgrade ]
6 |
7 | jobs:
8 | build:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/checkout@v3
12 |
13 | - uses: actions/setup-node@v3
14 | with:
15 | node-version: '21'
16 | cache: 'npm'
17 | - run: npm install
18 | - run: npm run build
19 |
20 | - name: Tailscale
21 | uses: tailscale/github-action@v2
22 | with:
23 | oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
24 | oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
25 | version: '1.50.1'
26 | tags: tag:static-sites
27 |
28 | - name: Deploy to Static Sites Host
29 | uses: burnett01/rsync-deployments@6.0.0
30 | with:
31 | switches: -avzr --delete
32 | path: build/
33 | remote_path: /var/www/docs/
34 | remote_host: ${{ secrets.DEPLOY_STATIC_SITE_HOST }}
35 | remote_user: ${{ secrets.DEPLOY_STATIC_SITE_USER }}
36 | remote_key: ${{ secrets.DEPLOY_STATIC_SITE_KEY }}
37 |
38 | - name: Purge BunnyCDN cache
39 | uses: eayllon/bunnycdn-purge-cache@253ab627f8e743b4d7f96e7020e8bc04377ac49d
40 | with:
41 | accessKey: ${{ secrets.BUNNY_API_KEY }}
42 | zoneID: ${{ secrets.BUNNY_ZONE_ID }}
43 |
--------------------------------------------------------------------------------
/docs/change-email.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Change your account email address
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | Log in to your Plausible Analytics account and in the top right menu, click on your account name and choose "**Account Settings**" to enter your account settings.
8 |
9 |
10 |
11 | To change your account email address, go into the "**Security**" section. Find the "**Email Address**" area, provide your current password and new email, and click on the "**Change Email**" button. You will be then requested to provide a verification code which will be sent to your new email address.
12 |
13 | Note that our system has two email addresses and that these may not necessarily be the same. One is for your Plausible account and the other one for your Paddle account. Paddle is our payment processor and they send the billing emails such as invoices to the email address on your Paddle account.
14 |
15 | Following the instructions on this page only changes your Plausible account email address. Do [contact us](https://plausible.io/contact) with details if you'd like to change your Paddle account email address as well.
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/js/apiv2-examples/custom-properties-response.json:
--------------------------------------------------------------------------------
1 | {
2 | "results": [
3 | {"metrics": [162], "dimensions": ["2024-09-04", "true"]},
4 | {"metrics": [126], "dimensions": ["2024-09-04", "false"]},
5 | {"metrics": [74], "dimensions": ["2024-09-05", "true"]},
6 | {"metrics": [86], "dimensions": ["2024-09-05", "false"]},
7 | {"metrics": [116], "dimensions": ["2024-09-06", "true"]},
8 | {"metrics": [97], "dimensions": ["2024-09-06", "false"]},
9 | {"metrics": [176], "dimensions": ["2024-09-07", "true"]},
10 | {"metrics": [191], "dimensions": ["2024-09-07", "false"]},
11 | {"metrics": [161], "dimensions": ["2024-09-08", "true"]},
12 | {"metrics": [172], "dimensions": ["2024-09-08", "false"]},
13 | {"metrics": [38], "dimensions": ["2024-09-09", "true"]},
14 | {"metrics": [50], "dimensions": ["2024-09-09", "false"]},
15 | {"metrics": [129], "dimensions": ["2024-09-10", "true"]},
16 | {"metrics": [125], "dimensions": ["2024-09-10", "false"]}
17 | ],
18 | "meta": {},
19 | "query": {
20 | "site_id": "dummy.site",
21 | "metrics": ["visitors"],
22 | "date_range": ["2024-09-04T00:00:00+00:00", "2024-09-10T23:59:59+00:00"],
23 | "filters": [],
24 | "dimensions": ["time:day", "event:props:is_customer"],
25 | "order_by": [["time:day", "asc"], ["event:props:is_customer", "desc"]],
26 | "include": {}
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/docs/contribute.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: How to contribute
3 | ---
4 |
5 | Thank you for being interested in contributing to Plausible Analytics! We’re very happy that you want to help us improve and grow our open source project! Here are some ways you can help us build better Plausible:
6 |
7 | 1. [Blogging](plausible-analytics-reviews.md), [tweeting](https://twitter.com/plausiblehq) and in any other way sharing with the world what you like about Plausible, what you use it for and how it helps you solve your challenges. Our growth can be attributed to people who love to use Plausible and who decide to share their Plausible experience with the world.
8 |
9 | 2. Submitting new feature ideas on [our feedback board](https://plausible.io/feedback). You can submit new feature ideas, comment on the existing requests, upvote features you’d like to see and subscribe to the particular feature to follow its progress.
10 |
11 | 3. Reporting bugs or issues that you've encountered in your use of Plausible [by contacting our support](https://plausible.io/contact).
12 |
13 | 4. Contributing to the development of Plausible on our GitHub page. Thanks to [our contributors](authors.md) we were able to reduce our script size, have many community integrations, develop the easy self-hosting solution and much more. Take a look at [our contributor guidelines](https://github.com/plausible/analytics/blob/master/CONTRIBUTING.md).
14 |
--------------------------------------------------------------------------------
/docs/realtime-dashboard.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Realtime dashboard
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | Plausible Analytics features a realtime view that tells you what's happening on your site live at that moment.
8 |
9 |
10 |
11 | You can get to the realtime dashboard by clicking on the number of "**current visitors**" or selecting "**Realtime**" in the date picker in the top right. You can also view the realtime dashboard by pressing the `R` key on your keyboard.
12 |
13 | The realtime dashboard will look familiar to you. All the same reports and metrics are there as in our default dashboard. You can also filter the realtime dashboard by any metric you click on. The realtime dashboard is updated every 30 seconds, so you don't have to refresh it to stay up to date.
14 |
15 | In the top chart, you can see the number of current visitors (defined as those that visited your site in the last 5 minutes), the number of unique visitors in the previous 30 minutes and the total number of page views in the last 30 minutes. In the graph itself, you can choose to display the number of unique visitors or page views in the previous 30 minutes.
16 |
17 | Top Sources, Top Pages, Locations and Devices reports all show the traffic in the last 5 minutes. The Goal Conversions report shows the number of conversions in the previous 30 minutes.
18 |
--------------------------------------------------------------------------------
/docs/register-account.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Register for an account
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | To use Plausible Analytics, you need to [register an account](https://plausible.io/register). To explore the product, we offer you a free 30-day trial. No credit card is required to sign up for the trial.
8 |
9 | You can test all the different features and use Plausible on multiple sites during the trial. Plausible is so lightweight that you can run it alongside Google Analytics without any negative impact on your site's performance.
10 |
11 | Fill in your full name and email address, choose your account password and click on the "**Start my free trial**" button.
12 |
13 |
14 |
15 | ## Verify your email address
16 |
17 | We'll send you an email to verify your email address. Look for an email with the subject line "**Your Plausible email verification code**".
18 |
19 | Please enter the four digit code that we sent to you through email to activate your Plausible Analytics account.
20 |
21 | Don't see this email in your inbox? Please check your spam folder and whether you've typed in the correct email address. [Contact us](https://plausible.io/contact) if the problem persists.
22 |
23 |
24 |
--------------------------------------------------------------------------------
/docs/hubspot-analytics.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: How to add Plausible Analytics to your HubSpot site
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | You can add Plausible Analytics tracking code to your HubSpot website same way you would add Google Analytics code or any other JavaScript code.
8 |
9 | In HubSpot you can inject code across your entire site or on an individual post or page. Since Plausible needs to track analytics across your entire site, use the option to add our script to all content hosted on a specific domain. Here's how:
10 |
11 | * You have to be a SuperAdmin to do this. In your HubSpot account, click on the settings icon in the main navigation bar.
12 |
13 |
14 |
15 | * In the left sidebar menu, navigate to "**Website**" > "**Pages**".
16 |
17 | * At the top of this page, click the "**Choose a domain to edit its settings"** dropdown menu and select a domain you'd like to track using Plausible.
18 |
19 | * In the "**Site header HTML**" field, enter your Plausible Analytics tracking code.
20 |
21 | * After adding your code, click on the "**Save**" button.
22 |
23 | Now you can go to your website and verify whether Plausible Analytics script has been added and to your Plausible Analytics account to see whether the stats are being tracked. See here [how to verify the integration](troubleshoot-integration.md).
24 |
--------------------------------------------------------------------------------
/docs/hugo-integration.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: How to add the script to your Hugo site
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | There are several simple ways to integrate Plausible Analytics with your Hugo documentation site. Let's take a look at them:
8 |
9 | ## Option 1 - recommended setup: Plausible Analytics community plugin
10 |
11 | * "**[A Hugo plugin for Plausible Analytics](https://github.com/divinerites/plausible-hugo)**". Built and maintained by Divinerites.
12 |
13 | You'll find included a [detailed documentation](https://github.com/divinerites/plausible-hugo/blob/master/README.md) for using it.
14 |
15 | It works for both:
16 |
17 | - Plausible Analytics Cloud version
18 | - Self-Hosted version.
19 |
20 | You can use it as:
21 |
22 | - a hugo module (recommended setup)
23 | - a simple theme
24 |
25 | And you can choose and manage all the Plausible functions:
26 |
27 | - add custom goals
28 | - add outbound link goal
29 | - manage automatically 404 custom goal
30 | - ignore tracking on certain pages
31 | - proxy the script (or use deprecated custom cname)
32 | - manage CSP rules
33 | - embed your dashboard with 1 line of code
34 | - eventually write public URL information in Web page source
35 |
36 | Plus you can:
37 |
38 | - debug your code
39 | - avoid bloating your statistics while developing/debugging
40 |
41 | ## Option 2 - basic setup:
42 |
43 | - [Add the script to your website](https://plausible.io/docs/plausible-script)
44 |
--------------------------------------------------------------------------------
/docs/change-plan.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Change your subscription plan
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | Log in to your Plausible Analytics account and in the top right menu, click on your account name, and choose "**Account Settings**" to enter your account settings.
8 |
9 | To change your subscription plan, go to the "**Subscription**" section and click on "**Change plan**".
10 |
11 |
12 |
13 | Select your new subscription plan and choose if you want to pay on a monthly or yearly basis. Then click on the "**Preview changes**" button.
14 |
15 |
16 |
17 | Next up, you will see your new charge that is due now. This is a pro-rated amount which reflects the amount you have paid on your previous subscription and the amount of time until that subscription was supposed to expire.
18 |
19 | A negative value for immediate payment amount represents a credit balance. This credit amount will automatically be used to deduct your upcoming payments until it's depleted.
20 |
21 | You will also see the date of the next subscription renewal and the amount of that payment. Your subscription will be renewed automatically, and you can change or cancel your plan at any time.
22 |
23 | Click on the "**Confirm plan change**" to confirm the new subscription.
24 |
25 |
26 |
--------------------------------------------------------------------------------
/docs/stop-tracking-utm-tags.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Stop tracking UTM tags and other query parameters
3 | ---
4 |
5 | By default, Plausible strips all query parameters for privacy purposes [except for](top-referrers.md) `ref`, `source`, `utm_source`, `utm_medium`, `utm_campaign`, `utm_content` and `utm_term`. If you prefer to stop tracking these parameters as well, please follow these instructions:
6 |
7 | ## Set `transformRequest` option in `plausible.init`
8 |
9 | The easiest way to stop tracking parameters is to use `transformRequest` to update the URL property sent to Plausible and prevent the tracking of UTM tag.
10 |
11 | To do so, in your Plausible tracking snippet, add the following:
12 |
13 | ```javascript
14 | function queryStrippedUrl() {
15 | return location.href.split('?')[0]
16 | }
17 |
18 | function transformRequest(payload) {
19 | // Sets url for the event manually
20 | payload.u = queryStrippedUrl()
21 | return payload
22 | }
23 |
24 | // At the end, update plausible.init call:
25 | plausible.init({
26 | transformRequest: transformRequest
27 | })
28 | ```
29 |
30 | That's it! You're now no longer tracking any UTM tags or other parameters. We will use the [referrer header](top-referrers.md) to display the sources of the traffic instead. If the referring site doesn't send any referrer header, the traffic will fall within the "**Direct / None**" source.
31 |
32 | :::note
33 | This solution may not work in single-page-applications or when using [hash-based routing](/hash-based-routing) as `location.href` may change before `transformRequest`
34 | is called.
35 | :::
36 |
--------------------------------------------------------------------------------
/docs/custom-props/for-pageviews.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Attach custom properties to pageviews
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | :::tip Using WordPress?
8 | The quickest way to start tracking custom properties is to use our [official WordPress plugin](https://plausible.io/wordpress-analytics-plugin)
9 | :::
10 |
11 | ## Add your custom properties to your Plausible snippet
12 |
13 | You can add custom properties by updating your Plausible snippet.
14 |
15 | To add properties that attach to every tracked event, update the `plausible.init` call to pass `customProperties` option:
16 |
17 | ```javascript
18 | plausible.init({
19 | // ... Other initialization options
20 | customProperties: {
21 | author: "John Doe",
22 | type: "blog-post"
23 | }
24 | })
25 | ```
26 |
27 | That's it! You're now tracking custom properties alongside pageviews.
28 |
29 | :::note
30 | If you don't see a `plausible.init` call in your snippet, [upgrade your script](/script-update-guide)
31 | :::
32 |
33 |
20 |
21 | ## How to reset your Plausible account password
22 |
23 | Forgot your Plausible account password? Here's how to reset your Plausible account password:
24 |
25 | * [Click here to request a password reset](https://plausible.io/password/request-reset).
26 | * Enter the email address you registered on your account and click on the "**Send reset link**" button.
27 | * Look for an email with the subject line "**Plausible password reset**" and click on the link within that email to change your account password.
28 | * Note that after you successfully reset your password, we will automatically log out [any of your active sessions](login-management.md) on your other devices.
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/js/sites.tsx:
--------------------------------------------------------------------------------
1 | import React, { ReactNode, createContext, useEffect, useState } from 'react'
2 | import BrowserOnly from '@docusaurus/BrowserOnly'
3 |
4 | export type SiteContextType = {
5 | loading: boolean,
6 | isLoggedIn: boolean,
7 | sites: Array
14 |
15 | * Add your Plausible Analytics script to the "**Site Header**" text box. Code added into the "**Site Header**" field is injected into the `` tag on every page of your site.
16 |
17 |
18 |
19 | * After adding your code, click on the "**Save**" button.
20 |
21 | Now you can go to your website and verify whether Plausible Analytics script has been added and to your Plausible Analytics account to see whether the stats are being tracked. See here [how to verify the integration](troubleshoot-integration.md).
22 |
23 |
24 |
25 | The Sign In/Sign up flows are part of Ghost's [Portal](https://ghost.org/help/setting-up-portal/) app and it's an unified experience for all Ghost sites. You cannot customize these flows by adding an ID or CSS class.
26 |
27 | However, you can bypass this and customize your sign up flows by using a custom theme on the "[Creator plan](https://ghost.org/pricing/)" or higher.
28 |
29 | If you're using a custom theme, you can simply add the tagged events extension to your script and CSS class to the element that you want to track as explained in [this doc](https://plausible.io/docs/custom-event-goals).
30 |
--------------------------------------------------------------------------------
/docs/custom-props/for-custom-events.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Attach custom properties to custom events
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | ## Tag properties to custom events you want to track
8 |
9 | Let's say you have a contact form both in the header and footer of your site. In addition to tracking submissions, you might want to know which section of your site the form was submitted on. Instead of creating separate goals for each form, you can send a custom property instead.
10 |
11 | Similarly to how you define an event name inside the `class` attribute, you can use the format `plausible-event-
20 |
21 | ## Shared link with a password protection
22 |
23 | You can add password protection to the shared link for extra security. Then people that you send your shared link to can only view the stats dashboard if they input the password you have chosen.
24 |
25 | If you prefer to share your stats without the password protection you can keep the password field blank. Click the "**Create shared link**" button and your new shared link will be displayed.
26 |
27 |
28 |
29 | ## Remove a particular shared link
30 |
31 | You can click on the trash can icon if you want to remove the particular shared link.
32 |
33 |
34 |
--------------------------------------------------------------------------------
/docs/devices.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Top devices, browsers and operating systems
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | Your "**Devices**" report shows the screen size, the browser and the operating system (OS) of your visitors. It helps you identify and understand the type of device your visitors use the most often so you can optimize your website experience to them. Click on any particular entry to filter the dashboard by that traffic and see further details such as the browser or OS version.
8 |
9 | You can click the "**Details**" button to see the full list with additional details like "Visitors", "%", "Bounce Rate", and "Visit Duration". Click on any such metric heading to sort and arrange your data in ascending or descending order.
10 |
11 | You can use the "**Filter**" button on the top of your dashboard to segment the traffic by multiple devices at the same time. Filter button also allows you to filter out traffic from specific devices.
12 |
13 |
14 |
15 | ## Screen size
16 |
17 | Your "**Screen size**" report shows the devices used by your website visitors. Devices are categorized into desktop, mobile or tablet. This is derived from the User-Agent HTTP header. The full User-Agent is discarded.
18 |
19 | ## Browser
20 |
21 | Your "**Browser**" report shows what browsers people use when visiting your website. We only show the brand of the browser and when you click on the brand you can see the version number too. This is derived from the User-Agent HTTP header. The full User-Agent is discarded.
22 |
23 | ## Operating system
24 |
25 | Your "**Operating system**" report shows what operating systems people use when visiting your website. We show the brand of the operating system and when you click on the brand you can see the version numbers too. This is derived from the User-Agent HTTP header. The full User-Agent is discarded.
26 |
27 | :::info Windows and macOS have stopped reporting their latest versions
28 | This means that Plausible and other analytics tools are not able to report the latest versions, which for Windows are above 10, and for macOS above 10.15. Visitors with the new versions will be grouped in the last known version
29 | :::
30 |
--------------------------------------------------------------------------------
/docs/download-invoices.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Download your invoices
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | Our payment processor Paddle sends an invoice to you through email automatically upon each payment. You can click on a link within this email to download your invoice.
8 |
9 | You can also download your invoices in your Plausible account. Log in to your Plausible account and in the top right menu, click on your account name and choose "**Account Settings**" to enter your account settings.
10 |
11 | To download your invoices, find the "**Invoices**" section. You'll see the list of your invoices and you can download the individual invoice by clicking on the link button.
12 |
13 |
14 |
15 | ## Adding your company address and VAT number
16 |
17 | If you haven't added your company details and VAT number during the subscription process, you can open any of your invoices and click on the "Add address & VAT Number" link to do so.
18 |
19 | ## Changing your billing address
20 |
21 | You can change the billing address by opening any of your invoices and clicking the "Edit business address" link.
22 |
23 | Unfortunately, changing a country associated with a subscription isn't possible due to legal and tax reasons. Suppose you wish to link the service to a company registered in a different country. You can wait until the current subscription expires, then cancel the subscription and resubscribe again from the same account with the address in the new country. You won't lose any of the data in this process.
24 |
25 | ## Changing the email address for invoices
26 |
27 | Our system has two email addresses and these may not necessarily be the same. The first email is for your Plausible account. This is the email you use to log in to your Plausible account to view your stats.
28 |
29 | The other email is for your Paddle account. Paddle is our payment processor and they send the billing emails such as invoices to the email address on your Paddle account.
30 |
31 | Would you like to change your Paddle email address to get your invoices sent to a different address? [Do contact us](https://plausible.io/contact) and tell us your current Paddle email and the new email address where you'd like to get invoices in the future.
32 |
--------------------------------------------------------------------------------
/docs/add-website.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Add your website details
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | Once you have an account, you can enter the domain name of the website you want to track. Please, remove `https` and `www` from the URL, just keep the `hostname`. For example, if your site is `https://www.yourdomain.com` then the part to enter in the "**Domain**" field is `yourdomain.com`.
8 |
9 | Does your site operate on multiple subdomains such as `docs.yourdomain.com` and `app.yourdomain.com`? Simply add your main domain name (`yourdomain.com`) to your Plausible account and use the same tracking snippet on all your subdomains. This keeps the visitor session [active between the main site and its subdomains](subdomain-hostname-filter.md).
10 |
11 | If you'd like to track a particular subdomain independently from the rest of your site, you can do that too. For example, if the subdomain you want to track on its own is `https://blog.yourdomain.com` then the part to enter in the "**Domain**" field is `blog.yourdomain.com`.
12 |
13 |
14 |
15 | :::tip Domain doesn't necessarily need to match the actual domain
16 | You don't necessarily need to install our snippet on the same domain as the domain you have added to your Plausible account. Think of the domain field in Plausible more like a site ID rather than an exact match. This allows you more flexibility in your setup all depending on your situation.
17 | :::
18 |
19 | ## Select your reporting timezone
20 |
21 | You need to select your reporting timezone too. This sets the day boundary of your reports regardless of where your traffic is coming from.
22 |
23 | For instance, if you select "**(GMT+01:00) Amsterdam, Berlin…**" then the beginning and the end of each day of your reporting is calculated based on the time in Amsterdam, even if your visitors come from London or New York.
24 |
25 | The best practice is to set the timezone that reflects the location of your audience or if the audience is very broad and spread across the world to set the timezone of your location.
26 |
27 | Click on the "**Add snippet**" button to go to the next step where we will provide you with the tracking snippet that you need to [insert into your site](plausible-script.md) to start counting your stats.
28 |
--------------------------------------------------------------------------------
/docs/sso-okta.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Configuring Okta
3 | ---
4 |
5 | import useBaseUrl from '@docusaurus/useBaseUrl';
6 |
7 | Before configuring Okta, you have to [initiate SSO setup in Plausible](sso#initiating-sso-setup-in-plausible).
8 |
9 | - Sign in to your Okta Admin console as an Admin
10 | - Go to **Applications**
11 |
12 |
13 |
14 | - Click **Create App Integration**, pick **SAML 2.0** and click "**Next**"
15 |
16 |
17 |
18 | - Put "Plausible" in the App name field, optionally upload a [logo](/img/plausible_logo.png) and click "**Next**"
19 |
20 |
21 |
22 | - Put **Single sign-on URL** and **Audience URI** obtained when [Initiating SSO Setup in Plausible](sso#initiating-sso-setup-in-plausible) in respective inputs, leave **Name ID format** as "Unspecified", **Application username** set to "Okta username" and **Update application username on** to "Create and update"
23 |
24 |
25 |
26 | - Scroll down to **Attribute Statements**, click "**Add Another**" two times and set the following mappings:
27 |
28 | - `first_name`: `user.firstName`
29 | - `last_name`: `user.lastName`
30 | - `email`: `user.email`
31 |
32 | The configured attributes should look like below:
33 |
34 |
35 |
36 | - Scroll down and click "**Next**"
37 | - Click "**Finish**" in the final setup wizard step
38 |
39 |
40 |
41 | - Go to "**Assignments**" tab and give People or Groups access to Plausible
42 |
43 |
44 |
45 | - Go back to "**Sign On**" tab and click "**More details**" under SAML 2.0 settings
46 |
47 |
48 |
49 | - Keep this page open while moving on to [Finishing SAML SSO Setup in Plausible](sso#finishing-saml-sso-setup-in-plausible)
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/src/js/apiv2-playground.tsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useCallback, useContext, Fragment } from 'react'
2 | import Admonition from '@theme/Admonition'
3 |
4 | import { SiteContext } from './sites'
5 | import EXAMPLES, { getExampleCode } from './examples'
6 | import { ApiV2Editor, JsonSchemaEditor, postQuery } from './apiv2-editor'
7 | import { Icon } from '@iconify/react'
8 |
9 | export function ApiV2Playground() {
10 | const { selectedSite } = useContext(SiteContext)
11 |
12 | const [id, setExample] = useState("example-aggregate")
13 | const [code, setCode] = useState(getExampleCode("query", id, selectedSite))
14 | const [response, setResponse] = useState(null)
15 |
16 | const onCodeChange = useCallback((code: string) => {
17 | setCode(code)
18 | setResponse(null)
19 | }, [])
20 |
21 | const runCode = useCallback(async () => {
22 | setResponse(null)
23 | const [response, data] = await postQuery(code)
24 |
25 | setResponse({
26 | status: response.status,
27 | statusText: response.statusText,
28 | ok: response.ok,
29 | data
30 | })
31 | }, [code])
32 |
33 | return (
34 | Status code: {response.status}
13 |
14 | - Click **Add app** > **Add custom SAML app**
15 |
16 |
17 |
18 | - Put "Plausible" in the App name field, optionally upload a [logo](/img/plausible_logo.png) and click "**Continue**"
19 |
20 |
21 |
22 | - Skip the next step by clicking "**Continue**" again
23 |
24 |
25 |
26 | - Put **ACS URL** and **Entity ID** obtained when [Initiating SSO Setup in Plausible](sso#initiating-sso-setup-in-plausible) in respective inputs, tick **Signed response** checkbox, leave **Name ID** configuration as is (format should be "Unspecified" and NameID should be "Basic Information > Primary email") and click "**Continue**"
27 |
28 |
29 |
30 | - Click "**Add mapping**" three times and set the following mappings:
31 |
32 | - Basic Information > First name: `first_name`
33 | - Basic Information > Last name: `last_name`
34 | - Basic Information > Primary email: `email`
35 |
36 | The configured attributes should look like below:
37 |
38 |
39 |
40 | - Click "**Finish**"
41 | - Click on "**User access**" card
42 |
43 |
44 |
45 | - Either pick "**ON for everyone**" or enable access for select groups and click "**Save**"
46 |
47 |
48 |
49 | - Go to **Security** > **Authentication** > **SSO with SAML applications**
50 |
51 |
52 |
53 | - Keep this page open while moving on to [Finishing SAML SSO Setup in Plausible](sso#finishing-saml-sso-setup-in-plausible)
54 |
55 |
--------------------------------------------------------------------------------