Use AJAX requesting _statistics data for javascript