I have successfully followed through the following Google article, https://developers.google.com/analytics/devguides/reporting/core/v3/quickstart/service-php and setup a basic php script for extracting Analytics data. It was quite easy :-)
I am now trying to integrate this code into my Symfony2 project. Now it seems that the library is written in an ancient style, no namespacing and filenames are different to that of the class in them. Can anyone help me on how I can integrate it into my symfony project? I have loaded in the git repository via composer with the follwoing:
Then to integrate it to Symfony the right way, please read the doc here to learn how to register your own services in your
Define your application name and your key as parameters in your
parameters.yml to reuse them in your service definitions.
Define a service for each class you instanciate (e.g. a service for
Google_Auth_AssertionCredentials, ...) with the right dependencies on other services and/or parameters.