Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looker Studio doc #576

Merged
merged 11 commits into from
Jan 21, 2025
2 changes: 1 addition & 1 deletion docs/data-pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ By using our official WordPress plugin, you can view your Plausible stats dashbo

## Looker Studio

There is a Plausible connector for [Looker Studio (formerly Google Data Studio)](https://www.epilocal.com/products/plausible-data-studio-connector/).
There is an official Plausible connector for [Looker Studio (formerly Google Data Studio)](looker-studio.md).

## Airbyte connector

Expand Down
10 changes: 5 additions & 5 deletions docs/integration-guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ Add Plausible records to [Prometheus](https://prometheus.io) to use with [Grafan

[plausibler](https://github.com/giocomai/plausibler): R wrapper for the Plausible API. Built and maintained by [Giorgio Comai](https://github.com/giocomai/).

## Readymag

Here's [how to add the script to your Readymag website](https://help.readymag.com/hc/en-us/articles/26933451909019-Plausible)

## Ruby

[Plausible API Ruby Gem](https://github.com/dailytics/plausible_api): This is a simple wrapper to read the Plausible API with Ruby. Built and maintained by [Dailytics](https://dailytics.com/).
Expand Down Expand Up @@ -324,13 +328,9 @@ A [TypeDoc Plausible plugin](https://typedoc-plausible.8hob.io/) that integrates

[How to add the script to your Wix site](wix-integration.md)

## Readymag

Follow the instructions here: [How to add the script to your Readymag website](https://help.readymag.com/hc/en-us/articles/26933451909019-Plausible)

## Data pipelines, warehouses and other ways of viewing Plausible stats elsewhere

[See this list](data-pipelines.md) for data pipelines, warehouses and other ways of viewing Plausible stats elsewhere.
[See this list](data-pipelines.md) for data pipelines, warehouses and other ways of viewing Plausible stats elsewhere. For instance, our [stats API](stats-api.md), [official WordPress plugin](https://plausible.io/wordpress-analytics-plugin) and [official Google Looker Studio connector](looker-studio.md).

---

Expand Down
67 changes: 67 additions & 0 deletions docs/looker-studio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
title: Looker Studio Connector
---

import useBaseUrl from '@docusaurus/useBaseUrl';

In order to focus on simplicity and speed, Plausible Analytics does not support the native ability to create custom reports directly in our dashboard. However, there are some advanced uses where creating custom reports is necessary.

For this reason, we have created an official integration with the free data visualization tool, Google Looker Studio (formerly known as Data Studio). You can use our Looker Studio connector to build custom reports with your Plausible Analytics data.

<img alt="Plausible Analytics Looker Studio template" src={useBaseUrl('img/plausible-looker-studio.png')} />

Here's how to get started with our official Looker Studio connector.

## Connect to Looker Studio

Connecting your Plausible Analytics account to Looker Studio is simple and can be done in a matter of minutes. First, you select our connector as a new data source in Looker Studio. You can either select it from the [Looker Studio connector gallery](https://lookerstudio.google.com/data) or you can follow [this direct link](https://lookerstudio.google.com/datasources/create?connectorId=AKfycbz88iSK4B6V-VoaiwocFu2dDp3CBRM0arAZoDjQ97SroAt9RtzgS6z3UCxpjJDi0ieVjQ).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Connecting your Plausible Analytics account to Looker Studio is simple and can be done in a matter of minutes. First, you select our connector as a new data source in Looker Studio. You can either select it from the [Looker Studio connector gallery](https://lookerstudio.google.com/data) or you can follow [this direct link](https://lookerstudio.google.com/datasources/create?connectorId=AKfycbz88iSK4B6V-VoaiwocFu2dDp3CBRM0arAZoDjQ97SroAt9RtzgS6z3UCxpjJDi0ieVjQ).
Connecting your Plausible Analytics account to Looker Studio is simple and can be done in a matter of minutes. First, you select our connector as a new data source in Looker Studio. You can find it on [this direct link](https://lookerstudio.google.com/datasources/create?connectorId=AKfycbz88iSK4B6V-VoaiwocFu2dDp3CBRM0arAZoDjQ97SroAt9RtzgS6z3UCxpjJDi0ieVjQ).


Once you have selected the data source, you will be prompted to authorize the connector to access your Google account.

<img alt="Authorize the Plausible connector" src={useBaseUrl('img/source-looker.png')} />

The only permission that will be asked for is to make an external API request, which is how the connector pulls data from [the Plausible Analytics Stats API](stats-api.md).

:::note
Our connector is currently in beta and undergoing a review by Google. This is why you see the note stating: "This connector has not been verified or reviewed"
:::

## Insert your Plausible stats API key

After authorizing your Google account, you will be prompted to enter your Plausible Analytics stats API key. You can create a new API key for our stats API by going to your Plausible Analytics account, navigating to "**Account Settings**" and clicking on the section called "**API Keys**".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After authorizing your Google account, you will be prompted to enter your Plausible Analytics stats API key. You can create a new API key for our stats API by going to your Plausible Analytics account, navigating to "**Account Settings**" and clicking on the section called "**API Keys**".
After authorizing your Google account, you will be prompted to enter your Plausible Analytics Stats API key. You can create a new API key for our stats API by going to your Plausible Analytics account, navigating to "**Account Settings**" and clicking on the section called "**API Keys**".


Click "**New API Key**" and be sure you save the result as you will only see the key once. However, you can always delete the key and create a new one if you no longer remember what it is.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Click "**New API Key**" and be sure you save the result as you will only see the key once. However, you can always delete the key and create a new one if you no longer remember what it is.
Click the "**New API Key**" button and be sure to save the result as you will only see the key once. However, you can always delete the key and create a new one if you no longer remember what it is.


<img alt="Create your Plausible stats API key" src={useBaseUrl('img/create-stats-api-key-looker.png')} />

Then you will just need to paste your API key into Looker Studio where you are prompted to enter your key. Once you do this, you will see a dropdown menu with all of the Plausible Sites connected to your account.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Then you will just need to paste your API key into Looker Studio where you are prompted to enter your key. Once you do this, you will see a dropdown menu with all of the Plausible Sites connected to your account.
Simply paste your API key into Looker Studio when prompted. After that, you'll see a dropdown menu showing all the sites linked to your Plausible account.```


<img alt="Insert your Plausible API key" src={useBaseUrl('img/plausible-api-looker.png')} />

This means you have successfully linked your Plausible Analytics account to Looker Studio.

## Configure the Plausible Looker Studio connector

You can select one or more of your Plausible sites to create a custom report. Simply tick the box next to each site that you want to include data for.

At this stage, you can check to "**Allow "Plausible Site(s)" to be modified in reports**". This option is something Looker Studio presents by default. It enables you to have a report with a drop-down to toggle your Plausible site(s) directly in the report. Not checking this box would disable that ability.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
At this stage, you can check to "**Allow "Plausible Site(s)" to be modified in reports**". This option is something Looker Studio presents by default. It enables you to have a report with a drop-down to toggle your Plausible site(s) directly in the report. Not checking this box would disable that ability.
At this stage, you can check to "**Allow "Plausible Site(s)" to be modified in reports**". This default option in Looker Studio lets you add a dropdown in your report to switch between your Plausible sites. If you don’t check it, you won’t have this feature.


You also have the ability to choose whether or not you want to constantly pull data in real-time by checking the "**Data Refreshed in Real-time**" box. Looker Studio does not refresh automatically but what this does is it will force Looker Studio to pull fresh data whenever you make a change to your report, say changing the order of a table or adding new metrics.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You also have the ability to choose whether or not you want to constantly pull data in real-time by checking the "**Data Refreshed in Real-time**" box. Looker Studio does not refresh automatically but what this does is it will force Looker Studio to pull fresh data whenever you make a change to your report, say changing the order of a table or adding new metrics.
You also have the ability to choose whether or not you want to constantly pull data in real-time by checking the "**Data Refreshed in Real-time**" box. Looker Studio doesn’t refresh automatically, so this option ensures it fetches fresh data whenever you make changes to your report, like reordering tables or adding metrics.


If this box is not checked, the connector will by default cache data for 6 hours. This will make your reports quicker and will limit the number of API requests used by the connector which for most Plausible plans are limited to 600 per hour. If you have special needs for more API requests per hour, please [contact us](https://plausible.io/contact) to request more capacity.

Once these options are configured, you can click "**Connect**" and you will see a list of all available fields for data and metrics that you can pull from Plausible.

<img alt="Configure the Plausible Looker Studio connector" src={useBaseUrl('img/choose-site-and-connect-looker.png')} />

## Create your custom reports

Finally, you can either click on "**Create Report**" or "**Explore**" to begin using your Plausible data in Looker Studio. Explore is best for ad-hoc data exploration while reports are best for creating set reports that you can share with others.

That's it! You're ready to start creating your custom reports using the Plausible Analytics data.

You can explore this [simple report](https://lookerstudio.google.com/s/gm8gS_IpBiQ) and this [advanced report](https://lookerstudio.google.com/s/ltrWC2jaK4Q) that we’ve created in Looker Studio which you can use as a template to start building your own custom reports.

If you need some help on how to use Looker Studio, take a look at [our Looker Studio beginner's guide](https://plausible.io/blog/google-looker-studio-guide).

<img alt="Create your custom reports" src={useBaseUrl('img/create-report-looker.png')} />
12 changes: 7 additions & 5 deletions docs/stats-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,27 @@ Take a look at our [Events API Reference](events-api.md) if you want to record p

## Authentication

You can obtain an API key for your account by going to your user settings page [plausible.io/settings](https://plausible.io/settings).
You can create a new stats API key by going to your Plausible Analytics account, navigating to "**Account Settings**" and clicking on the section called "**API Keys**". The key will be valid for all sites that you own.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can create a new stats API key by going to your Plausible Analytics account, navigating to "**Account Settings**" and clicking on the section called "**API Keys**". The key will be valid for all sites that you own.
You can create a new Stats API key by going to your Plausible Analytics account, navigating to "**Account Settings**" and clicking on the section called "**API Keys**". The key will be valid for all sites that you own.


After creating a token, you can authenticate your request by sending the token in the Authorization header of your request.
Click "**New API Key**" and be sure you save the result as you will only see the key once. However, you can always delete the key and create a new one if you no longer remember what it is.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Click "**New API Key**" and be sure you save the result as you will only see the key once. However, you can always delete the key and create a new one if you no longer remember what it is.
Click the "**New API Key**" button and be sure to save the result as you will only see the key once. However, you can always delete the key and create a new one if you no longer remember what it is.


After creating an API key, you can authenticate your request by sending the key in the Authorization header of your request.

### Example curl request

In the following request, replace YOUR-TOKEN with a reference to your token and site_id value with your domain.
In the following request, replace `YOUR-KEY` with a reference to your stats API key and `site_id` value with your domain as you've added it to your Plausible account.

```bash
curl \
--request POST \
# highlight-next-line
--header 'Authorization: Bearer YOUR-TOKEN' \
--header 'Authorization: Bearer YOUR-KEY' \
--header 'Content-Type: application/json' \
--url 'https://plausible.io/api/v2/query' \
--data '{ "site_id": "dummy.site", "metrics": ["visitors"], "date_range": "7d" }'
```

API keys have a rate limit of 600 requests per hour by default. If you have special needs for more requests, please contact us to request more capacity.
API keys have a rate limit of 600 requests per hour by default. If you have special needs for more requests, [please contact us](https://plausible.io/contact) to request more capacity.

## Request structure

Expand Down
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ module.exports = {
'subdomain-hostname-filter',
'metrics-definitions',
'keyboard-shortcuts',
'looker-studio',
'dashboard-faq',
{
type: 'category',
Expand Down
Binary file added static/img/authorize-looker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/choose-site-and-connect-looker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/create-report-looker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/create-stats-api-key-looker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/plausible-api-looker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/plausible-looker-studio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/source-looker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading