Analytics Client and config

I am integrating into my cms and we are using the piwik library just to do analytics api calls through native php (not through rest).

Question 1) Anyone know of a stripped down class to interface with analytics api natively through php? We don’t need all the bloat from all the tracking features.

Question 2) when instantiating client like Piwik_FrontController::getInstance()->init(); it would awesome if we could set database credentials somehow not from the config file. We have a db for testing and one for production. It would be nice if we could dynamically set which database we are querying from our own cms config file without having to change the piwik config file. I know I can bootstrap the file for a different location, but it still remains static and is an ugly solution. I’ve seen the knp labs client and it suffers from the same problem.