From a517ab3b8964331a215d6f42e4c8eee9dcd3cfd4 Mon Sep 17 00:00:00 2001 From: Marko Saric Date: Fri, 8 May 2026 10:02:30 +0200 Subject: [PATCH] sidebar --- docs/authors.md | 1 + docs/buttondown.md | 1 + docs/carrd-integration.md | 1 + docs/community-integrations.md | 1 + docs/contribute.md | 1 + docs/custom-automatic-link-tracking.md | 1 + docs/custom-domain.md | 1 + docs/custom-locations.md | 1 + docs/custom-pageview-props.md | 1 + docs/custom-query-params.md | 1 + docs/data-pipelines.md | 1 + docs/discourse-integration.md | 1 + docs/docusaurus-integration.md | 1 + docs/excluding-localstorage.md | 1 + docs/excluding-pages.md | 1 + docs/get-started-with-postman.md | 1 + docs/ghost-integration.md | 1 + docs/google-tag-manager.md | 1 + docs/hash-based-routing.md | 1 + docs/hubspot-analytics.md | 1 + docs/hugo-integration.md | 1 + docs/internal-link-click-tracking.md | 1 + docs/javascript-snippet.md | 1 + docs/manual-link-tagging.md | 1 + docs/mediawiki-integration.md | 1 + docs/nextjs-integration.md | 5 ++-- docs/plausible-analytics-reviews.md | 1 + .../plausible-analytics-self-hosted-guides.md | 1 + docs/proxy/guides/akamai.md | 1 + docs/proxy/guides/apache.md | 4 ++-- docs/proxy/guides/caddy.md | 2 +- docs/proxy/guides/cloudflare.md | 12 ++++++---- docs/proxy/guides/cloudfront.md | 1 + docs/proxy/guides/deno.md | 1 + docs/proxy/guides/fastly.md | 1 + docs/proxy/guides/fresh.md | 1 + docs/proxy/guides/laravel.md | 18 +++++++------- docs/proxy/guides/netlify.md | 12 +++++++--- docs/proxy/guides/nextjs.md | 1 + docs/proxy/guides/nginx.md | 2 +- docs/proxy/guides/vercel.md | 8 +++++-- docs/script-extensions-for-wp-plugin.md | 1 + docs/script-extensions.md | 6 ++++- docs/script-update-guide.md | 1 + docs/self-hosting-configuration.md | 1 + docs/self-hosting.md | 1 + docs/shopify-integration-deprecated.md | 1 + docs/shopify-integration.md | 1 + docs/spa-support.md | 1 + docs/squarespace-integration.md | 1 + docs/stats-api-v1.md | 1 + docs/stop-tracking-utm-tags.md | 1 + docs/troubleshoot-integration.md | 24 ++++++++++++++----- docs/twitter.md | 1 + docs/verify-integration.md | 1 + docs/webflow-integration.md | 1 + docs/wix-integration.md | 1 + docs/wordpress-integration.md | 1 + docusaurus.config.js | 7 ++++++ src/css/custom.css | 5 ++++ 60 files changed, 123 insertions(+), 30 deletions(-) diff --git a/docs/authors.md b/docs/authors.md index 6e3987525..3cb1cebf7 100644 --- a/docs/authors.md +++ b/docs/authors.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Our team --- diff --git a/docs/buttondown.md b/docs/buttondown.md index 69f70a202..41257fb2a 100644 --- a/docs/buttondown.md +++ b/docs/buttondown.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: How to add the script to Buttondown --- diff --git a/docs/carrd-integration.md b/docs/carrd-integration.md index 95efd8f6e..aa40d2a89 100644 --- a/docs/carrd-integration.md +++ b/docs/carrd-integration.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Adding Plausible to Carrd (and tracking custom events) --- diff --git a/docs/community-integrations.md b/docs/community-integrations.md index ccea0592f..682d57d09 100644 --- a/docs/community-integrations.md +++ b/docs/community-integrations.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Community integrations --- diff --git a/docs/contribute.md b/docs/contribute.md index 7a5ed2297..76a047808 100644 --- a/docs/contribute.md +++ b/docs/contribute.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: How to contribute --- diff --git a/docs/custom-automatic-link-tracking.md b/docs/custom-automatic-link-tracking.md index 0cb95443e..9334a443f 100644 --- a/docs/custom-automatic-link-tracking.md +++ b/docs/custom-automatic-link-tracking.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Tracking clicks on cloaked affiliate links and other pretty URLs --- diff --git a/docs/custom-domain.md b/docs/custom-domain.md index c2a3f6a2a..55c04ed67 100644 --- a/docs/custom-domain.md +++ b/docs/custom-domain.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Serve the script from your domain as a first-party connection --- diff --git a/docs/custom-locations.md b/docs/custom-locations.md index 132108a15..5e96337f1 100644 --- a/docs/custom-locations.md +++ b/docs/custom-locations.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Specify a custom location to aggregate pages that contain identifiers --- diff --git a/docs/custom-pageview-props.md b/docs/custom-pageview-props.md index 6e8eccb81..05f5a1b6d 100644 --- a/docs/custom-pageview-props.md +++ b/docs/custom-pageview-props.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Custom properties for pageviews --- diff --git a/docs/custom-query-params.md b/docs/custom-query-params.md index 5e7907951..7fc8197db 100644 --- a/docs/custom-query-params.md +++ b/docs/custom-query-params.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Tracking custom query parameters --- diff --git a/docs/data-pipelines.md b/docs/data-pipelines.md index 58f4bdeb8..b58738a95 100644 --- a/docs/data-pipelines.md +++ b/docs/data-pipelines.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Viewing Plausible stats elsewhere --- diff --git a/docs/discourse-integration.md b/docs/discourse-integration.md index 6be737f8b..198640da9 100644 --- a/docs/discourse-integration.md +++ b/docs/discourse-integration.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: How to add the script to your Discourse community --- diff --git a/docs/docusaurus-integration.md b/docs/docusaurus-integration.md index f2860af28..de88349d9 100644 --- a/docs/docusaurus-integration.md +++ b/docs/docusaurus-integration.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: How to add the script to your Docusaurus site --- diff --git a/docs/excluding-localstorage.md b/docs/excluding-localstorage.md index ea93d2a2c..f18af8518 100644 --- a/docs/excluding-localstorage.md +++ b/docs/excluding-localstorage.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Opt out and exclude your visits from the analytics by setting a localStorage flag in your browser --- diff --git a/docs/excluding-pages.md b/docs/excluding-pages.md index 6f1a3450f..fb09fb0cf 100644 --- a/docs/excluding-pages.md +++ b/docs/excluding-pages.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Exclude specific pages from being tracked --- diff --git a/docs/get-started-with-postman.md b/docs/get-started-with-postman.md index 8922f4487..d16c6f5f5 100644 --- a/docs/get-started-with-postman.md +++ b/docs/get-started-with-postman.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: How to get started with the Stats API using Postman --- diff --git a/docs/ghost-integration.md b/docs/ghost-integration.md index 869a14ae4..b40514660 100644 --- a/docs/ghost-integration.md +++ b/docs/ghost-integration.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: How to add the script to your Ghost site --- diff --git a/docs/google-tag-manager.md b/docs/google-tag-manager.md index 11481e281..3baa431b5 100644 --- a/docs/google-tag-manager.md +++ b/docs/google-tag-manager.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: How to add the script to your site using Google Tag Manager --- diff --git a/docs/hash-based-routing.md b/docs/hash-based-routing.md index d2368c125..3f318d2c7 100644 --- a/docs/hash-based-routing.md +++ b/docs/hash-based-routing.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Hashed page paths --- diff --git a/docs/hubspot-analytics.md b/docs/hubspot-analytics.md index caa25d714..a4723cd9a 100644 --- a/docs/hubspot-analytics.md +++ b/docs/hubspot-analytics.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: How to add Plausible Analytics to your HubSpot site --- diff --git a/docs/hugo-integration.md b/docs/hugo-integration.md index ed560d1a9..1401a951c 100644 --- a/docs/hugo-integration.md +++ b/docs/hugo-integration.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: How to add the script to your Hugo site --- diff --git a/docs/internal-link-click-tracking.md b/docs/internal-link-click-tracking.md index 59d231a80..d8d37fea4 100644 --- a/docs/internal-link-click-tracking.md +++ b/docs/internal-link-click-tracking.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Internal link click tracking --- diff --git a/docs/javascript-snippet.md b/docs/javascript-snippet.md index 43822d172..f9a3bb81c 100644 --- a/docs/javascript-snippet.md +++ b/docs/javascript-snippet.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Where do I find my JavaScript snippet? --- diff --git a/docs/manual-link-tagging.md b/docs/manual-link-tagging.md index d7fe6a3d5..1b0580629 100644 --- a/docs/manual-link-tagging.md +++ b/docs/manual-link-tagging.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Paid campaigns, UTM tags and conversion attribution --- diff --git a/docs/mediawiki-integration.md b/docs/mediawiki-integration.md index 1fff970fc..eadccd95f 100644 --- a/docs/mediawiki-integration.md +++ b/docs/mediawiki-integration.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: How to add Plausible to your MediaWiki instance --- diff --git a/docs/nextjs-integration.md b/docs/nextjs-integration.md index 9fd7a3ab6..6ab747054 100644 --- a/docs/nextjs-integration.md +++ b/docs/nextjs-integration.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: How to add the script to your NextJS site --- @@ -10,7 +11,7 @@ You can add the script directly to your head through "next/head" or react-helmet ## Serving the Plausible script -```jsx +```jsx title="pages/index.jsx" import PlausibleProvider from 'next-plausible' export default Home() { @@ -25,7 +26,7 @@ export default Home() { ## Sending custom events -```jsx +```jsx title="components/PlausibleButton.jsx" import {usePlausible} from 'next-plausible' export default PlausibleButton() { diff --git a/docs/plausible-analytics-reviews.md b/docs/plausible-analytics-reviews.md index 823a86673..71816b38a 100644 --- a/docs/plausible-analytics-reviews.md +++ b/docs/plausible-analytics-reviews.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Plausible Analytics reviews and in media --- diff --git a/docs/plausible-analytics-self-hosted-guides.md b/docs/plausible-analytics-self-hosted-guides.md index b6592fa34..7165f8390 100644 --- a/docs/plausible-analytics-self-hosted-guides.md +++ b/docs/plausible-analytics-self-hosted-guides.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Plausible Community Edition (CE) --- diff --git a/docs/proxy/guides/akamai.md b/docs/proxy/guides/akamai.md index fee699990..21bd22556 100644 --- a/docs/proxy/guides/akamai.md +++ b/docs/proxy/guides/akamai.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Proxying Plausible through Akamai --- diff --git a/docs/proxy/guides/apache.md b/docs/proxy/guides/apache.md index 3688caf70..9e4592849 100644 --- a/docs/proxy/guides/apache.md +++ b/docs/proxy/guides/apache.md @@ -10,7 +10,7 @@ Our managed proxy lets you send analytics through your own domain name as a firs ## Step 1: Enable the required modules -``` +```bash sudo a2enmod proxy sudo a2enmod proxy_http sudo a2enmod ssl @@ -32,7 +32,7 @@ the snippet specific for your site. It will look similar to the following: Your snippet will have a different script location than the example above. Look for the `https://plausible.io/js/pa-XXXXX.js` part in your snippet - that's the personalized location for your site's script. Mark it down for subsequent steps. ## Step 3: Update your config -``` +``` title="apache-vhost.conf" ServerName website.com diff --git a/docs/proxy/guides/caddy.md b/docs/proxy/guides/caddy.md index a7faec51c..7b18ce80d 100644 --- a/docs/proxy/guides/caddy.md +++ b/docs/proxy/guides/caddy.md @@ -28,7 +28,7 @@ Your snippet will have a different script location than the example above. Look Add the following to your Caddyfile: -``` +``` title="Caddyfile" @plausible path /js/script.js /api/event handle @plausible { # Use path from step 1 diff --git a/docs/proxy/guides/cloudflare.md b/docs/proxy/guides/cloudflare.md index 429fd5e41..4b58690f3 100644 --- a/docs/proxy/guides/cloudflare.md +++ b/docs/proxy/guides/cloudflare.md @@ -21,7 +21,7 @@ In your Cloudflare account, click on the "Compute (Workers" > 'Workers & Pages' ## Step 2 (Optional): You can change your service name -This is optional but you can change the service name to give your worker a more meaningful name. Do avoid words like 'plausible', 'analytics', 'tracking', 'stats', etc. as they may be blocked. It's also fine to keep the random name that Cloudflare generates by default. Then click on the 'Deploy' button. +This is optional but you can change the service name to give your worker a more meaningful name. It's also fine to keep the random name that Cloudflare generates by default. Then click on the 'Deploy' button. Deploy CloudFlare worker @@ -46,7 +46,9 @@ Next click on the 'Edit Code' button, remove the default code that Cloudflare pr Edit CloudFlare worker -We recommend you change the folder name in the first two lines in the code below. This makes your proxy more difficult to discover and block. We especially recommend you change the folder name in the two lines if you're not hosting your site on the Cloudflare CDN. +:::tip +Change the folder name in the first two lines of the code below. This makes your proxy harder to discover and block, especially if you're not hosting your site on the Cloudflare CDN. +::: In the **ProxyScript** line, change `https://plausible.io/js/pa-XXXXX.js` to your script location from step 3. @@ -54,9 +56,11 @@ In the **ScriptName** line, change the `/js/` to whatever you wish. Say `/your-f In the **Endpoint** line, change the `/api/` to whatever you want. It can be the same as above but you can also choose something different. If you choose `/your-folder-name/`, then the full location would be `/your-folder-name/event`. -Do avoid words like 'plausible', 'analytics', 'tracking', 'stats', etc. as they may be blocked. +:::warning +Avoid words like 'plausible', 'analytics', 'tracking', 'stats' in path names as they may be blocked. +::: -```js +```js title="cloudflare-worker.js" const ProxyScript = 'https://plausible.io/js/pa-XXXXX.js' const ScriptName = '/js/script.js'; const Endpoint = '/api/event'; diff --git a/docs/proxy/guides/cloudfront.md b/docs/proxy/guides/cloudfront.md index 6caa0322a..d2f1a974f 100644 --- a/docs/proxy/guides/cloudfront.md +++ b/docs/proxy/guides/cloudfront.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Proxying Plausible through CloudFront --- diff --git a/docs/proxy/guides/deno.md b/docs/proxy/guides/deno.md index e1611a0c2..bc276f1c3 100644 --- a/docs/proxy/guides/deno.md +++ b/docs/proxy/guides/deno.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Proxying Plausible through Deno Deploy --- diff --git a/docs/proxy/guides/fastly.md b/docs/proxy/guides/fastly.md index 0caa9c8c6..ee8a4313c 100644 --- a/docs/proxy/guides/fastly.md +++ b/docs/proxy/guides/fastly.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Proxying Plausible through Fastly --- diff --git a/docs/proxy/guides/fresh.md b/docs/proxy/guides/fresh.md index 7cdadb5fe..91de1b653 100644 --- a/docs/proxy/guides/fresh.md +++ b/docs/proxy/guides/fresh.md @@ -1,4 +1,5 @@ --- +displayed_sidebar: someSidebar title: Proxying Plausible through Fresh --- diff --git a/docs/proxy/guides/laravel.md b/docs/proxy/guides/laravel.md index dc91cdc1a..d987e9a61 100644 --- a/docs/proxy/guides/laravel.md +++ b/docs/proxy/guides/laravel.md @@ -29,7 +29,7 @@ php artisan make:controller PlausibleProxyController Add the following code to the controller, replacing `https://plausible.io/js/pa-XXXXX.js` with the script location from Step 1. -```php +```php title="app/Http/Controllers/PlausibleProxyController.php" name('plausible.script'); Route::post('/api/event', [PlausibleProxyController::class, 'event'])->name('plausible.event'); ``` -Note that: - -- You can use whatever paths you like here. Do choose generic names. If you choose something like `analytics`, `stats` or `plausible`, it may get blocked. +:::warning +Use generic path names. Paths like `/analytics`, `/stats` or `/plausible` may get blocked by adblockers. +::: ## Step 4: Exempt the event route from CSRF -The Plausible script sends POST requests to the event endpoint, which Laravel's CSRF protection will block by default. +:::warning +Laravel's CSRF protection will block POST requests to the event endpoint by default. This step is required for tracking to work. +::: In your `bootstrap/app.php` file, add the event route to the CSRF exceptions: -```php +```php title="bootstrap/app.php" ->withMiddleware(function (Middleware $middleware) { $middleware->validateCsrfTokens(except: [ 'api/event', // Add this line @@ -104,7 +106,7 @@ In your `bootstrap/app.php` file, add the event route to the CSRF exceptions: Add the script tags to your application's HTML ``, configuring the `src` and `endpoint` to match the named route from Step 3: -```blade +```blade title="layout.blade.php"