User Activity Request with laravel analytics

I am using this library : https://github.com/spatie/laravel-analytics

I am trying to figure out how to do a User Activity request as documented here: https://developers.google.com/analytics/devguides/reporting/core/v4/user-reporting.

I know that you can make custom reports with laravel analytics with ‘Analytics::perfomQuery’.

I cant seem to find the right metrics and dimensions to get the request right. I have tried it with several combinations like this:

Analytics::performQuery(
            Period::days(8),
            'ga:sessions',
            [    
    
                'metrics' => 'ga:users'
            ]
        );

Source: Laravel

Leave a Reply