Question

I wish to develop a php script in order to export some daily data of a Google Analytics account in a separate database through API. This script must run daily, called with a cron job.

I see that I need to make a manual connect to gather data from google analytics. Is there a way to automate the login, without doing it manually?

Thanks in advance. Luca

Était-ce utile?

La solution

You can do this with a service account Service Account

Also make sure you use the new client lib found here: google-api-php-client. The one linked on the service account page is the older version. There should also be some samples in the github project.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top