Git Product home page Git Product logo

laravel-analytics-v4's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar mrjavadseydi avatar walrussoup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

laravel-analytics-v4's Issues

Config `service_account_credentials_json` does not accept an array

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

Google ApiException "And group cannot be empty in the filter expression" Google response on filter method

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.