Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 1.76 KB

File metadata and controls

58 lines (41 loc) · 1.76 KB

Usage

Get your credential

All is explain here.

Configuration

The bundle can be configured quite easily, and of course you can change the configuration given your environment (dev, test, prod):

# app/config/config.yml
widop_google_analytics:
    client_id:        "XXXXXXXXXXXX@developer.gserviceaccount.com"
    profile_id:       "ga:XXXXXXXX"
    private_key_file: "%kernel.root_dir%/Resources/bin/myPrivateKey.p12"
    http_adapter:     "widop_http_adapter.curl"

The client_id, profile_id and private_key_file parameters are mandatory while the http_adapter is optionnal. By default, this parameter is set to widop_http_adapter.curl. If you want to change the http adapter you can take a look at the WidopHttpAdapterBundle documentation.

For testing purpose, you can change the google analytics url used internally by the bundle to fetch you datas:

# app/config/config_test.yml
widop_google_analytics:
    service_url: http://your-own-url

Query

The query documentation is available here. To create a new one:

$query = $this->container->get('widop_google_analytics.query');

Client

The client documentation is available here. To get it:

$client = $this->container->get('widop_google_analytics.client');

Service

The service documentation is available here. To get it:

$service = $this->container->get('widop_google_analytics');