i-like-it-solutions / google-analytics-api
Google Analytics API v4 Symfony
Installs: 25
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Language:CSS
Type:symfony-bundle
Requires
- php: >=5.5.9
- google/apiclient: ^2.0
- symfony/assetic-bundle: ^2.8
- symfony/framework-bundle: >=2.3
- symfony/twig-bundle: >=2.0
- twig/twig: >=1.6
Requires (Dev)
- phpunit/phpunit: 5.5.*
This package is not auto-updated.
Last update: 2024-05-10 22:56:51 UTC
README
A Symfony project created on July 4, 2017, 06:14 pm.
Bundle Configuration to set Google Analytics Accounts
Add following code in app/config/config.yml assetic: debug: '%kernel.debug%' use_controller: '%kernel.debug%' filters: cssrewrite: ~
Add following code in app/config/routing.yml google_analytics_api: resource: "@GoogleAnalyticsApiBundle/Resources/config/routing.yml" prefix: /
Register the following bundle in AppKernal.php
new Symfony\Bundle\AsseticBundle\AsseticBundle(), new iLikeItSolutions\GoogleAnalyticsApiBundle\GoogleAnalyticsApiBundle(),
Client Secret File steps:
- Go to Google API console https://console.developers.google.com
- Create APP and Activate the Analytics API in the Google API Console.
- Redirect URI http://localhost:8000/callback
- After save Download JSON file and renamed it to client_secrets.json
- Copy and paste client_secrets.json file to bundle location "iLikeItSolutions/GoogleAnalyticsApiBundle/Data/"
Google Analytics Account View ID steps:
- Go to Google analytics site and login https://analytics.google.com
- Click on Top left Corner to see accounts then click Account Name >> Click Property Name >> then Copy View ID (Numeric) from Views Tab
- Now Paste above View ID into bundle file path "iLikeItSolutions/GoogleAnalyticsApiBundle/Resources/config/service.yml" variable ga_view_id