Skip to main content
All CollectionsIntegrations
How to Integrate Matomo?
How to Integrate Matomo?
Atharva Joshi avatar
Written by Atharva Joshi
Updated over 3 months ago

Let's learn how to integrate Matomo:

Part 1:

What is the token_auth and where can I find this token to use in the API calls?

Token Authentication

Token Authentication Overview

The token_auth acts as your password for authenticating API requests in Matomo. Each Matomo user has a unique token_auth.

Generating a token_auth

Matomo 4 and Newer

  1. Log in to Matomo.

  2. Navigate to the Matomo Admin via the top menu.

  3. Go to Personal -> Security.

  4. Click on "Create new token" at the bottom of the page.

  5. Confirm your account password.

  6. Enter a purpose for the token.

  7. Click on "Create new token".

The newly created token will be displayed. Save it in a secure location, such as a password manager, as you won’t be able to view it again after leaving the screen. If the token is lost, you will need to generate a new one.

Provide API token

Provide the API token in the space provided to save it in the platform.

Matomo 3 and Older

  1. Log in to Matomo (formerly Piwik).

  2. Click on Administration the top menu.

  3. Select API from the left menu to find your token_auth.

If needed, the token_auth can be re-generated by any user through Administration > Personal Settings.

Note: Do not enable the 'Only allow secure requests' option while generating the token, as this blocks us from fetching the segment data.

Did this answer your question?