Does such a module exist - to programmatically create a new website, NOT manually create a website via admin area

Hi,

We are considering using Piwik for a new application (built in asp.net, it will be hosted on Windows server + IIS). Before we can make this decision, we need to know if the following module or function already exists?

Our application would allow registered users to create apps and publish them in real time. The urls for these apps would be:

examplesite.com -&nbspThis website is for sale! -&nbspexample site Resources and Information. (with 1 being the ID for the app, under the “AAA” category)
examplesite.com -&nbspThis website is for sale! -&nbspexample site Resources and Information. (with 250 being the ID for the app, under the “AAA” category)
examplesite.com -&nbspThis website is for sale! -&nbspexample site Resources and Information. (with 27 being the ID for the app, under the “BBB” category)

We want to add tracking code to each of the above example url, as soon as each app is published - Which requires us to “programmatically” add a website in Piwik, then generate the proper tracking code with the site id, then add the tracking code to these pages - NOT manually doing this in the admin area.

We have read the Piwik documentation but did not find an exisiting function or module that can be called to do the above task - did we miss anything? Please confirm.

Also - if there is not an existing module for this, has any previous Piwik user already added such a module?

Please let us know.

Thanks!

SoftDev

Hi there,

Sure it is possible to automatically create websites (and delete, update them, etc.) by using the SitesManager API documented here: Reporting API Reference: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3