If you want to use data from Piwik PRO in Klipfolio, you can use our API to connect the two tools. The setup is easy and does not require much technical knowledge from you. Once connected, you’ll be able to access and view your Piwik PRO data in Klipfolio dashboards and reports.
To integrate with Klipfolio, follow these steps:
Note: In this example, we’ll get the number of sessions per day for the last 60 days.
- Log in to Klipfolio.
- Go to Data Sources.
- Click Create a new data source.
- Choose REST/URL.
- Enter the following information:
- Query URL: https://example.piwik.pro/api/analytics/v1/query/
Note: Replace
example
with your account name in the query URL.- Data Format: CSV
- Encoding: UTF-16
- Method: POST
- Body:
{ "relative_date": "last_60_days", "website_id": "SITE_OR_APP_ID", "offset": 0, "limit": 100, "format": "csv", "columns": [ { "column_id": "timestamp", "transformation_id": "to_date" }, { "column_id": "sessions" } ], "order_by": [ [ 1, "desc" ] ], "filters": null, "metric_filters": null }
Note: Replace
SITE_OR_APP_ID
with your ID. Where to find it?Tip: For more about API queries, see our API documentation.
- In Query Parameters, enter the following parameters:
- First parameter:
- Name: Authorization
- Value: Bearer [auth_token]
- Type: Header
- Second parameter:
- Name: Content-Type
- Value: application/vnd.api+json
- Type: Header
- First parameter:
- In Authentication (OAuth, 2-Step, X-WSSE, or Basic), enter the following information:
- Type: 2-Step Authentication
- Username: Keep it empty
- Password: Keep it empty
- Response: Text
- Method: POST
- Body:
{ "grant_type": "client_credentials", "client_id": "YOUR_CLIENT_ID", "client_secret": "YOUR_CLIENT_SECRET" }
Note: Get your API credentials and replace your client ID and client secret in the code.
- Parameters:
- Name: Content-Type
- Value: application/vnd.api+json
- Type: Header
- Auth URL: https://example.piwik.pro/auth/token
Note: Replace
example
with your account name in the query URL.- Token Path: “access_token”:”(.*?)”
Note: Include quotes in the token path.
- Click Get data.
- Select Model your data on the confirmation screen and click Continue.
Note: If you receive an error message, check to see if the Data Format is set as CSV.
- Make sure Klipfolio recognizes the date column as a date and the session column as a number.
- (Optional) Rename your connection.
- Click Save and Exit.
- All done! You can now use data from Piwik PRO in Klipfolio.