Php tracking code?

(Toobaz) #1


I recently started using piwik and I find it very nice. But honestly, the main reason why I migrated away from Google Analytics was that I thought “if I do my own tracking, my visitors won’t have to download a javascript (from another site than what they are visiting)”.

I was quite disappointed to see that:

  • piwik is also based on javascript tracking code
  • if I want to use a single installation (e.g. www.example.y/piwik) to track multiple sites, each of those sites will still use the same image www.example.y/piwik/piwik.php?idsite=1 , and hence visitors will see “Connecting to www.example.y” in the status bar and will ask “hey, what’s happening?! That’s not the site I’m visiting!”…

Is it theoretically possible/practically feasible to work with some hidden php code? I guess I would loose

  • the ability to know the time spent on pages
  • the ability to know downloaded (non-php) files…

but assuming that’s fine for me, can this be done?


(vipsoft) #2

Server-side tracking API is planned for 0.8.

If your websites reside on the same physical server, you can symlink to a single Piwik installation. This also has the advantage of using first party cookies.

(Toobaz) #3

2 great answers, thank you.

(I humbly suggest adding them to the FAQ - the first can just extend answer )