added analytics functions to phpAPI.php, analyticCharts.js reverted to how Carter left it.