I have a website where most of the traffic comes from the API (<http://untiny.com/api/>). I use Google Analytics to collect traffic data, however, the statistics do not include the API traffic because I couldn't include the Google Analytics javascript code into the API pages, and including it will affect the API results. (example: <http://untiny.com/api/1.0/extract/?url=tinyurl.com/123>).

The solution might be executing the javascript using a javascript engine. I searched stackoverflow and found javascript engines/interpreters for Java and C, but I couldn't find one for PHP except an old one "J4P5" <http://j4p5.sourceforge.net/index.php> 

The question: is using a javascript engine will solve the problem? or is there another why to include the API traffic to Google Analytics?