Display of analytics on my business website


(Pavan Vishwanath) #1

Hey there!!

I want to integrate and display my piwik analysis on my business website for customer view.
I have tried using the widget provided in the settings but my login credentials are being asked.

Please guide me on how can the analytics be displayed on the website without wanting my credentials . Kindly assist.

Thanks in advance.


(Fabian Dellwing) #2

This should work: Create a user with view access to the site, use the auth code of this user to show the widget.


(Pavan Vishwanath) #3

Can you please elaborate, as I am new to Matomo


(Fabian Dellwing) #4

Ok, please first read this text visible on the widgets page:

If you want your widgets to be viewable by everybody, you first have to set the ‘view’ permissions to the anonymous user in the Users Management section.
Alternatively, if you are publishing widgets on a password protected or private page, you don’t necessarily have to allow ‘anonymous’ to view your reports. In this case, you can add the secret token_auth parameter (found in the API page) in the widget URL.

First option: Setting view permission for anonymous user is a good and easy choice if have not websites that should not be public viewable. Just go to System -> Users and set the role for the anonymous user to view.

Second option: Use this option if you do not want everybody to be able to see all you sites in Matomo. First create a new user, name it like websitename_view and choose the website you want to widgetize as his first website. Than login as this user and go to Personal -> Settings and copy the API key you find there. This API key can than be added to the widget URL &token_auth=yourapikey. Afterwards the widget will work without authentication and if someone steals the API key he can not break you site.


(Pavan Vishwanath) #5

Thank you very much. I shall try as suggested by you.