title: How to capture a website API traffic data with Google Analytics?
body: <p>I have a website where most of the traffic comes from the API (<a href="http://untiny.com/api/" rel="noreferrer">http://untiny.com/api/</a>). 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: <a href="http://untiny.com/api/1.0/extract/?url=tinyurl.com/123" rel="noreferrer">http://untiny.com/api/1.0/extract/?url=tinyurl.com/123</a>).</p>
  
  <p>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" <a href="http://j4p5.sourceforge.net/index.php" rel="noreferrer">http://j4p5.sourceforge.net/index.php</a> </p>
  
  <p>The question: is using a javascript engine will solve the problem? or is there another why to include the API traffic to Google Analytics?</p>