Bulk adding domains to self hosted motomo?

Hello guys,

First thank you for this wonderful project. I have about 300 websites and i would like to track them all, i have webapp that manages header scripts of all those sites so my question is, is there a way to bulk add sites in motomo, like insert same script to each site and it will detect and generate data for them?



Matomo has an extensive API that allows you to automate every action:


In your case the SitesManager.addSite API is most helpful.

So the URL looks something like (without newlines)

&token_auth=[your token_auth]

If you then know the siteId of the website, you can even automate the fetching of the tracking code

&token_auth=[your token]