Skip to content

1. Installing

Akki Khare edited this page Feb 14, 2022 · 3 revisions

You can install the package via composer:

composer require akki-io/laravel-google-analytics

Once the package has been installed, you can publish the config file using.

php artisan vendor:publish --provider="AkkiIo\LaravelGoogleAnalytics\LaravelGoogleAnalyticsServiceProvider"

The following config file will be published in config/laravel-google-analytics.php

<?php

return [
    /*
     * The property id of which you want to display data.
     */
    'property_id' => env('GOOGLE_ANALYTICS_PROPERTY_ID'),

    /*
     * Path to the client secret json file.
     */
    'service_account_credentials_json' => env('GOOGLE_SERVICE_ACCOUNT_CREDENTIALS', storage_path('app/analytics/service-account-credentials.json')),
];
Clone this wiki locally