PHP code example of panchania83 / laravel-nova-google-analytics-4

1. Go to this page and download the library: Download panchania83/laravel-nova-google-analytics-4 library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

panchania83 / laravel-nova-google-analytics-4 example snippets


return [

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

    /*
     * Path to the client secret json file. Take a look at the README of this package
     * to learn how to get this file. You can also pass the credentials as an array
     * instead of a file path.
     */
    'service_account_credentials_json' => storage_path('app/analytics/service-account-credentials.json'),
];


// in app/Providers/NovaServiceProvider.php

// ...

public function cards()
{
    return [
        // ...
        new \panchania83\LaravelNovaGoogleAnalytics4\VisitorsMetric,
        new \panchania83\LaravelNovaGoogleAnalytics4\GoogleAnalyticsCard,
    ];
}
 bash
php artisan vendor:publish --tag="analytics-config"
ini
PROPERTY_ID=