Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/data-pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The Plausible Stats API offers a way to retrieve your stats programmatically. [L

## Embedded dashboard

You can embed your Plausible stats dashboard into any other website using an iFrame. This is useful in case you want to showcase your stats on your own website or if you want to offer Plausible-powered web analytics dashboard (without our branding) directly in your user interface. [Learn more here](embed-dashboard.md).
You can embed your Plausible stats dashboard into any other website using an HTML iframe. This is useful in case you want to showcase your stats on your own website or if you want to offer Plausible-powered web analytics dashboard (without our branding) directly in your user interface. [Learn more here](embed-dashboard.md).

## WordPress plugin

Expand Down
27 changes: 11 additions & 16 deletions docs/embed-dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,19 @@ title: Embed the dashboard without our branding into your user interface

import useBaseUrl from '@docusaurus/useBaseUrl';

You can embed your Plausible stats dashboard into any other website using an iFrame. This is useful in case you want to showcase your stats on your own website or if you want to [offer Plausible-powered web analytics dashboard (without our branding)](https://plausible.io/white-label-web-analytics) directly in your user interface.
You can embed your Plausible stats dashboard into any other website using an HTML iframe. This is useful in case you want to showcase your stats on your own website or if you want to [offer Plausible-powered web analytics dashboard (without our branding)](https://plausible.io/white-label-web-analytics) directly in your user interface.

## 1. Create a shared link

<img alt="Plausible Analytics" src={useBaseUrl('img/shared-stats.png')} />
You need to create a shared link to embed your dashboard into another website. See our [shared link docs](shared-links.md#how-to-create-a-shared-link) to see how.

You need to create a shared link to embed your dashboard into another website. The shared link is secure and impossible to guess.

In the "**Visibility**" area of your website settings there's a "**Shared links**" section where you can create your shared link. Click on the "**+ new link**" button to do so.

Click the "**Create shared link**" button and your new shared link will be displayed.

:::info Make sure to keep the password field blank
It's technically not possible to embed a password-protected dashboard. When you try to embed a password-protected dashboard, the browser will show a "refused to connect" error message
:::info Make sure to keep the password field blank
It's technically not possible to embed a password-protected dashboard. When you try to embed a password-protected dashboard, the browser will show a "refused to connect" error message.
:::

## 2. Generate the embed code

In the "**Visibility**" area of your website settings there's the "**Embed dashboard**" section where you can generate the embed code.
In the "**Visibility**" area of your website settings there's the "**Embed dashboard**" section where you can generate the embed code.

Enter your shared link URL, select the theme of the embed dashboard (light, dark or system), optionally choose a custom background color and click on the "**Generate embed code**" button.

Expand All @@ -32,7 +26,7 @@ It's much more convenient than figuring out the hex code for your background col

Want your embed to have default filters or time period? Instead of using the default shared link URL for generating the embed, you can open the shared link, apply filters to your dashboard and use the URL with the applied filters. Those filters will then be automatically added to your embed dashboard every time it's loaded. Note that these are [our regular filters](filters-segments.md) and your visitors can remove or change them to view other stats as well.

<img alt="Generate embed code" src={useBaseUrl('img/embed-dashboard-code.png')} />
<img alt="Generate embed code" src={useBaseUrl('img/embed-dashboard.png')} />

## 3. Paste the embed code into your website

Expand All @@ -55,12 +49,13 @@ container you create for it. This way you can choose your own max-width and to a

```html
<body>
<div style="width: 400px;"> <!-- the wrapping container lets you control the width -->
<!-- below the embed code generated for &width=manual shared link -->
</div>
<div style="width: 400px;">
<!-- the wrapping container lets you control the width -->
<!-- below the embed code generated for &width=manual shared link -->
</div>
</body>
```

:::tip Prefer to build a completely custom dashboard?
:::tip Prefer to build a completely custom dashboard?
[Our stats API](stats-api.md) allows you to take individual metrics and create a custom-built dashboard within your UI in whichever shape or form you want. This requires more development time from your side but you get full flexibility
:::
41 changes: 30 additions & 11 deletions docs/shared-links.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,49 @@ title: Share your stats with a private and secure link

import useBaseUrl from '@docusaurus/useBaseUrl';

Shared links are useful for specific use cases such as if you want to share your stats with (potential) partners or advertisers. Or if you're an agency or working as a freelancer and want to share the stats [with your clients](https://plausible.io/for-freelancers-agencies). You can also use shared links to [embed the unbranded Plausible dashboard](embed-dashboard.md) directly into your site or product.
Shared links are useful for specific use cases such as if you want to share your stats with (potential) partners or advertisers. Or if you're an agency or working as a freelancer and want to share the stats [with your clients](https://plausible.io/for-freelancers-agencies). You can also use shared links to [embed the unbranded Plausible dashboard](embed-dashboard.md) directly into your site or product.

People that you send your shared link to can view the stats dashboard without having a Plausible Analytics account and without needing to log in. They can only view the specific dashboard that you shared and can't see any other sites that you have added to your Plausible account.


:::tip Want to share the stats with your team members instead?
See how to [invite team members and set user roles](users-roles.md)
:::

## How to create a shared link

In the "**Visibility**" area of your website settings there's a "**Shared links**" section. This is where you can decide to share your dashboard by generating a shared link. Click on the "**+ new link**" button to do so. The shared link is secure and impossible to guess by default.
Go to the "**Visibility**" area of your website settings and find the "**Shared links**" section. Click the "**Add shared link**" button. A modal will open up where you will find the following options.

People that you send your shared link to can view the stats dashboard without having a Plausible Analytics account and without needing to log in. They can only view the specific dashboard that you shared and can't see any other sites that you have added to your Plausible account.
<img alt="share stats with collaborators" src={useBaseUrl('img/shared-links-in-plausible-analytics.png')} />

### Options

#### Name

<img alt="Plausible Analytics" src={useBaseUrl('img/shared-stats.png')} />
Add a display name for your own reference. This won't be visible to anyone viewing the link.

## Shared link with a password protection
#### Password

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.
If you add password protection to the shared link, people that you send your shared link to can only view the stats if they enter the password.

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.
You can only set the password when creating the shared link, and you won't be able to see, edit, or remove the password from this link later on. If you forget it, you'll have to delete the link and create a new one.

#### Limit to segment

If you enable this option, anyone who opens the dashboard using the shared link will always see data filtered by the [selected segment](https://plausible.io/docs/filters-segments#how-to-save-a-segment) only. Only site segments (i.e. segments that anyone on your team can use) can be used.

Viewers won't be able to remove that segment from the dashboard. They can see which filters are included in it and they can add more filters on top of it.

This makes it possible to share only the part of your analytics that matters to a specific audience. For example, you might want to share data only for visitors from a certain country or only for traffic related to a campaign. It prevents viewers from changing the base filters and seeing data you did not intend to share.

:::info
As an example, if the selected segment contains the filters "Country is Estonia or Poland" and "Page is not /private", visitors will be able to drill down further by adding "Country is Estonia" filter. If they try to go outside of the segment, by adding the filter "Country is Italy" as an example, they will see no data.
:::

<img alt="Plausible Analytics" src={useBaseUrl('img/create-shared-link.png')} />
## How to edit a shared link

## Remove a particular shared link
Click on the pencil icon next to the link in the links list if you want to edit the shared link. This will open the modal where you can change the name of the shared link and toggle off the option of limiting to segment.

You can click on the trash can icon if you want to remove the particular shared link.
## How to remove a shared link

<img alt="Plausible Analytics" src={useBaseUrl('img/shared-links-overview.png')} />
Click on the trash can icon next to the link in the links list if you want to remove the shared link.
Binary file removed static/img/create-shared-link.png
Binary file not shown.
Binary file added static/img/embed-dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed static/img/shared-stats.png
Binary file not shown.