About Google Sheets
Google Sheets is a web-based spreadsheet application that allows users to create, edit, and collaborate on spreadsheets in real-time. Part of Google Workspace, it offers features such as data analysis tools, chart creation, and seamless integration with other Google services, making it ideal for both personal and professional use.
Learn more on: https://workspace.google.com/intl/en/products/sheets/
PA Connect Google Sheets
The PA Connect Google Sheets allows you to import your Piano Analytics data into Google Sheets via our API v3. To start benefiting from this connector, please follow the steps described below.
This integration is based on our v3 API, and is therefore subject to its limitations. To find out more about the limitations of our v3 API, click here.
It is also subject to all the limitations imposed by Google on imports from third-party tools:
https://developers.google.com/apps-script/guides/services/quotas#current_limitations
Prerequisites :
- Have a Piano Analytics account.
- Create an API key.
Export your data to Google Sheets
Data export works via a script, which you'll need to install directly via the Google Sheets application.
1. Install the script
- Once you have downloaded the script, open your Google Sheets and click Extensions > Apps Script:
- Create a new script (File > New > Script file) , and paste the code from piano-analytics.gs before saving:
2. API authentication
- Return to your sheet (it should reload, if not, reload the page). You should see a new menu at the top (next to the Help section), called Piano Analytics.
- Click on Piano Analytics > Add your API key. You'll receive authorization alerts - accept them and log in to your Google account (as authentication data is linked to your Google account).
- Enter your Piano Analytics API key when prompted (if not, click Piano Analytics > Add your API key again, or refresh the page) and confirm.
- You are now connected to the API for this Google Sheets sheet. To disconnect, click on Piano Analytics > Delete current API Key.
3. Import your data to your sheet
- From any cell on your sheet, you can click on Piano Analytics > Load data in the current cell. You will be asked to paste the URL (GET) of your Data Query:
As a reminder, here is where to retrieve the URL (GET) from your Data Query template:
- You can also directly use the formula : =ImportPAApiData("YOUR API URL (GET)"). Your data has now been successfully imported into your sheet:
Other methods
If you do not want to use this script, you can always import your data using Mixed Analytics or Supermetrics:
Mixed Analytics:
Link: https://mixedanalytics.com/api-connector/
Steps:
1/ Generate an API Key from your User Profile
2/ Build your template in Data Query
3/ Retrieve the API request URL (GET)
4/ Import the API Connector addon in Google Sheets
5/ Create a new request using the API URL
Headers:
Key | Value |
Content-Type | application/json |
x-api-key | accesskey_secretkey |
6/ Choose the “grid” display style
7/ Save and play the query
Quick start guide: https://mixedanalytics.com/knowledge-base/api-connector-quick-start/
The connector can also work with POST requests.
Supermetrics:
Link: https://supermetrics.com/product/google-sheets
Steps:
1/ Generate an API Key from your User Profile
2/ Build your template in Data Query
3/ Retrieve the API request URL (GET)
4/ Import the Supermetrics addon in Google Sheets
5/ In the addon pannel, choose data source “Custom JSON/CSV”
6/ Copy the API URL in the field “Type URL”
http headers : X-API-Key: accesskey_securekey
7/ Choose the “grid” display style
8/ Save and play the query
Quick start guide: https://supermetrics.com/docs/product-google-sheets-getting-started/