myoutdeskllc / laravel-analytics-v4 Goto Github PK
View Code? Open in Web Editor NEWLaravel-Analytics for Google Analytics v4 Properties
License: MIT License
Laravel-Analytics for Google Analytics v4 Properties
License: MIT License
The original Spatie package allows for the service_account_credentials_json
value in the published config file to be a file or Array.
When trying to pass an Array the package still tries to use the value as if it were a file.
We have to set the config variables dynamically as we deal with multiple clients and multiple service account creds.
Are there plans to match the original Spatie option of allowing an array here too?
Thanks
Hi, I also want to get empty values using includeEmptyRows parameter. Is this possible?
Cant order by dimension if a metric exits.
Hello, thanks for this library development. :) I want to get GAnalytics data and filter by eventName, I have this code
$client = App::make('laravel-analytics-v4');
$period = Period::months(1);
$filter = new \Myoutdeskllc\LaravelAnalyticsV4\Filters\StringFilter();
$filter->setDimension('eventName')->exactlyMatches('scroll');
$config = (new RunReportConfiguration())
->setDateRange($period)
->addDimensions(['pagePath', 'date', 'eventName'])
->addMetrics(['active1DayUsers', 'eventValue'])
->orderByMetric('active1DayUsers', true)
->addFilter($filter);
$results = $client->runReport($config);
dump($results);
but I get the following exception
Google\ApiCore\ApiException PHP 8.1.4 Laravel 9.5.1
{ "message": "And group cannot be empty in the filter expression.", "code": 3, "status": "INVALID_ARGUMENT", "details": [] }
If I remove the filter option I have results with scroll eventName
7 => array:2 [
"dimensions" => array:3 [
"pagePath" => "/post/f12b51ae-23b6-4180-a3de-616c710263ed"
"date" => "20220917"
"eventName" => "scroll"
]
"metrics" => array:2 [
"active1DayUsers" => "2"
"eventValue" => "0"
]
]
How can I solve it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.