PHPackages                             rezuankassim/bqanalytic - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. rezuankassim/bqanalytic

ActiveLibrary[API Development](/categories/api)

rezuankassim/bqanalytic
=======================

This is a package to ease integration between BigQuery and Firebase Analytics

1.4.2(6y ago)2192[4 PRs](https://github.com/rezuankassim/bqanalytic/pulls)MITPHP

Since Apr 14Pushed 3y ago2 watchersCompare

[ Source](https://github.com/rezuankassim/bqanalytic)[ Packagist](https://packagist.org/packages/rezuankassim/bqanalytic)[ Docs](https://github.com/rezuankassim/bqanalytic)[ RSS](/packages/rezuankassim-bqanalytic/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (7)Versions (31)Used By (0)

BQAnalytic
==========

[](#bqanalytic)

[![Latest Version on Packagist](https://camo.githubusercontent.com/59b7506f935d2c951475cc69581e3694557fe9cbd207a37d1658d70383b48d22/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72657a75616e6b617373696d2f6271616e616c797469632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rezuankassim/bqanalytic)

This is where your description should go. Take a look at [contributing.md](contributing.md) to see a to do list.

Installation
------------

[](#installation)

Via Composer

```
$ composer require rezuankassim/bqanalytic
```

Optionally you can publish the configuration file

```
$ php artisan vendor:publish RezuanKassim/BQAnalytic/BQAnalyticServiceProvider
```

Important
---------

[](#important)

In your .env file, make sure you have these value setup

```
GOOGLE_CLOUD_APPLICATION_CREDENTIALS=path_to_your_credentials_file
GOOGLE_CLOUD_PROJECT_ID=your_google_cloud_project_id
BQANALYTIC_BQ_TABLE_NAME=your_bigquery_datasets_name
GOOGLE_CLOUD_APPLICATION_NAME=your_google_cloud_application_name

```

Then

```
$ php artisan migrate
```

After that

```
$ php artisan db:seed --class=AnalyticSeeder
```

If you an error popup when running the command above, you need to publish the vendor file.

Usage
-----

[](#usage)

Include this code into your user entity

```
use RezuanKassim\BQAnalytic\Traits\hasAnalyticPreferences;

....

class User extends Authenticatable
{
    use Notifiable, hasAnalyticPreferences;
```

Then run `php artisan bqanalytic:export` to export big query data into your local database

Note that: `php artisan bqanalytic:export` can receive two date which is start date and end date behind it like `php artisan bqanalytic:export 20200420 20200420`

Next, in your controller

```
use RezuanKassim\BQAnalytic\BQAnalytic;

...

$results = (new BQAnalytic(auth()->user(), Carbon::createFromFormat('d/m/Y', $range[0])->format('Ymd'), Carbon::createFromFormat('d/m/Y', $range[1])->format('Ymd')))->getAllAnalytics()[config('bqanalytic.google.accounts')[0]['name']];
```

Optionally you can enable multiple project by

```
BQANALYTIC_MULTIPLE_PROJECTS=true

```

setting this variable in your env and publishing the config file

and insert the code below in `google => [accounts => [here]] `

```
    [
        'name' => 'YOUR_PROJECT_NAME',
        'google_credential' => "FULL_PATH_TO_YOUR_CREDENTIALS",
        'google_project_id' => 'PROJECT_ID',
        'google_bq_dataset_name' => 'YOUR_DATASET_NAME'
    ]
```

By version 1.3, you are able to store all the clients in the database if you wish

```
BQANALYTIC_CLIENT_FROM_DB=true

```

in .env file

This will use an included `RezuanKassim\BQAnalytic\BQClient` model to store the clients information

Optionally you also can use own model by including

```
BQANALYTIC_CLIENT_MODEL=App\Client

```

in .env file

But remember to include these codes in your client model

```
use RezuanKassim\BQAnalytic\Traits\hasClientFromDB;

...

class Client extends Model
{
    use hasClientFromDB;

    protected $table = 'bq_clients';

    protected $guarded = ['created_at', 'updated_at', 'id'];

    protected $casts = [
        'status' => 'boolean'
    ];
}
```

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits
-------

[](#credits)

- [author name](https://github.com/rezuankassim)
- [All Contributors](../../contributors)

License
-------

[](#license)

license. Please see the [license file](license.md) for more information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

23

Last Release

2204d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fa3f33491270a2949b001c45f11efd6b3bf1e018be20fac49577df22a055955c?d=identicon)[rezuankassim](/maintainers/rezuankassim)

---

Top Contributors

[![rezuankassim](https://avatars.githubusercontent.com/u/53212160?v=4)](https://github.com/rezuankassim "rezuankassim (55 commits)")

---

Tags

bigqueryfirebase-analyticslaravellaravelBQAnalytic

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rezuankassim-bqanalytic/health.svg)

```
[![Health](https://phpackages.com/badges/rezuankassim-bqanalytic/health.svg)](https://phpackages.com/packages/rezuankassim-bqanalytic)
```

###  Alternatives

[andreaselia/laravel-api-to-postman

Generate a Postman collection automatically from your Laravel API

1.0k586.2k3](/packages/andreaselia-laravel-api-to-postman)[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[api-ecosystem-for-laravel/dingo-api

A RESTful API package for the Laravel and Lumen frameworks.

3121.5M10](/packages/api-ecosystem-for-laravel-dingo-api)[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)[mll-lab/laravel-graphiql

Easily integrate GraphiQL into your Laravel project

683.2M9](/packages/mll-lab-laravel-graphiql)[kirschbaum-development/laravel-openapi-validator

Automatic OpenAPI validation for Laravel HTTP tests

581.1M5](/packages/kirschbaum-development-laravel-openapi-validator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
