Requirements for embedding Matomo reports
Before you can embed your analytics reports, first you have to configure permissions. By default, Matomo will not let other people see your data. You can make your data public in one of two ways:
Publish in a public website or app
By default, report data and all information in your Matomo server are protected and nobody can access it. To view and access any analytics data, Matomo always asks you to sign in with a valid user account. To embed the widgets without your users having to logging in to view them, follow the steps in How do I make Matomo report data public and viewable by anyone?
Learn more in [Manage Users documentation]).
Embed Matomo widgets on a password protected or private page
If you embed your analytics widgets on a password protected or private page, we recommend in this case that you follow these steps:
- create a new user,
- give it “View” access to the website you wish to embed in your password protected page,
- login to Matomo using these credentials,
- create a token_auth if you don’t have one yet see our FAQ,
- copy and paste this
&token_auth=your_token_auth_hereat the end of the widget URL in the widget embed HTML code.
Note: for security reasons, embedding the reports will only work when you use a token of the “View” permission (if you use a “Write” or “Admin” permission token an error message will be displayed instead.)