When you don't have access to the user's IP address, you can use the quotaUser and send it an identifier:
quotaUser
Alternative to userIp.
* Lets you enforce per-user quotas from a server-side application even in cases when the user's IP address is unknown. This can occur, for example, with applications that run cron jobs on App Engine on a user's behalf.
* You can choose any arbitrary string that uniquely identifies a user, but it is limited to 40 characters.
* Overrides userIp if both are provided.
* Learn more about capping usage.
When you don't have access to the user's IP address, you can use the quotaUser and send it an identifier:
https://developers.google.com/analytics/devguides/reporting/mcf/v3/parameters