Splitting tracker and reporting websites


(cmroanirgo) #1

I was wondering what would need to be done to split the tracker part of piwik away from the admin/reporting website.

That is, i’d like to use the tracker on out public website, but have the reporting only available from an internal url.
eg.
The public website would have:
mysite.com/piwik/piwik.js
mysite.com/piwik/piwik.php

but to view the stats you’d go to a different url all together:
private.mysite.com/piwik

Another way to ask the same question:
What is the minimum set of files needed to just have the tracker part working?
That is, can I delete all the folders, except for config and core?
I would also obviously delete index.php…
Is there other stuff in core that I can remove?

Any help appreciated.


(vipsoft) #2

My recommendation is that you don’t do that. We can’t guarantee any minimal subset of files won’t change in a future release. You also lose out on auto-updates.

Consider using an .htaccess file on your external, public facing site to limit access to piwik.js and piwik.php.


(cmroanirgo) #3

[quote=vipsoft @ Dec 29 2009, 05:22 AM]My recommendation is that you don’t do that. We can’t guarantee any minimal subset of files won’t change in a future release. You also lose out on auto-updates.

Consider using an .htaccess file on your external, public facing site to limit access to piwik.js and piwik.php.[/quote]

ok, in response to that, i’ve decided to modify my apache conf files to do as you suggested. Here are my settings:

<directory /var/www/piwik/>
	AllowOverride None
	#limit any access to just our corporate site
	Order deny,allow
	deny from all
	allow from xxx.xxx.xxx.xxx
</directory>
<FilesMatch "piwik">
	#allow access to piwik.js and piwik.php, the tracker files
	Order allow,deny
	allow from all
</FilesMatch>

…and it seems to work well. The outside world has access to piwik.js and piwik.php, but is forbidden for everything else.