I use one database hosted on a server by itself and each website has its own domains.com/piwik using the database hosted on the other server. I do this to avoid linking my websites to each other to people who look at my code.
Since the new version it doesnt seem to work. When I install a piwik on the same database it wont let me reuse the same tables. It always asks me to overwrite them.
Don’t rerun the installer. You’re getting that because there’s no config file in whatever website’s directory you’re working in.
Can you use soft-links? If so, you can soft-link to a shared piwik folder from each website’s directory.
If not, take a look at Include & Customize Piwik for your Project - Analytics Platform - Matomo Assuming you don’t have open_basedir restrictions, you would unzip piwik into each website’s directory. Then create a bootstrap.php file in each, and define PIWIK_USER_PATH and PIWIK_INCLUDE_PATH to point to the shared piwik folder.
The thing is my piwik is hosted on a different hosting account. And I have many different hosting accounts. From what the Arvixe support told me it is not possible to create soft-links from one account to another.
unzip Piwik into each hosting account’s website folder.
copy the config/config.ini.php file over to each website’s piwik/config/ folder.
But there are some downsides:
set up something like rsync to keep the config/ and tmp/cache/tracker/ folders synchronized across hosting accounts
for a software update, you have to manually update the software on the other hosting accounts (or again, use something like rsync)
Another option would be to copy piwik.js and libs/PiwikTracker/PiwikTracker.php to each hosting account’s website folder.
Then create a proxy script (called “piwik.php”) that forwards the tracking request to the real “piwik.php” on whatever hosting account hosts your Piwik installation, e.g.,