Integration into XML Api for iPhone Apps?

Greetings.

I’m using an iPhone App to load data from an API (custom joomla module).
Now, I can’t include the javascript code into that API results for obvious reasons (It’s XML, so it won’t ever be executed by the parser).
Can I fire a visit event through PHP?

Regards,
Chris


Edit 1: I just found it on the manual: Tracking API - Analytics Platform - Matomo
Must have overseen it before.

Edit 2: How would this work, when Piwik runs on a different server than the site? I can not require_once from an external server. Does it support SOAP? Remember, I can’t do it the image-/javascript way, the only solution is to PHP-fire the event IMO.

Edit 2: How would this work, when Piwik runs on a different server than the site? I can not require_once from an external server. Does it support SOAP? Remember, I can’t do it the image-/javascript way, the only solution is to PHP-fire the event IMO.

Thats how the tracking API works, it fires the beacon. It is written in PHP but there is JAVA version as well.