{"id":15060794,"url":"https://github.com/rezuankassim/bqanalytic","last_synced_at":"2026-02-01T01:34:59.482Z","repository":{"id":38154257,"uuid":"255297229","full_name":"rezuankassim/bqanalytic","owner":"rezuankassim","description":"Laravel package to use analytic data imported to Big Query from Firebase Analytic","archived":false,"fork":false,"pushed_at":"2023-02-02T12:05:15.000Z","size":23142,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-18T18:33:31.329Z","etag":null,"topics":["bigquery","firebase-analytics","laravel"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rezuankassim.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":"contributing.md","funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-13T10:36:11.000Z","updated_at":"2020-04-29T09:37:57.000Z","dependencies_parsed_at":"2023-02-17T19:31:27.836Z","dependency_job_id":null,"html_url":"https://github.com/rezuankassim/bqanalytic","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/rezuankassim/bqanalytic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezuankassim%2Fbqanalytic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezuankassim%2Fbqanalytic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezuankassim%2Fbqanalytic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezuankassim%2Fbqanalytic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rezuankassim","download_url":"https://codeload.github.com/rezuankassim/bqanalytic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezuankassim%2Fbqanalytic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28963913,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T01:25:30.373Z","status":"ssl_error","status_checked_at":"2026-02-01T01:25:29.809Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bigquery","firebase-analytics","laravel"],"created_at":"2024-09-24T23:04:42.685Z","updated_at":"2026-02-01T01:34:59.469Z","avatar_url":"https://github.com/rezuankassim.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BQAnalytic\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n\u003c!-- [![Total Downloads][ico-downloads]][link-downloads]\n[![Build Status][ico-travis]][link-travis]\n[![StyleCI][ico-styleci]][link-styleci] --\u003e\n\nThis is where your description should go. Take a look at [contributing.md](contributing.md) to see a to do list.\n\n## Installation\n\nVia Composer\n\n``` bash\n$ composer require rezuankassim/bqanalytic\n```\nOptionally you can publish the configuration file\n\n``` bash\n$ php artisan vendor:publish RezuanKassim/BQAnalytic/BQAnalyticServiceProvider\n```\n\n## Important\n\nIn your .env file, make sure you have these value setup\n\n```\nGOOGLE_CLOUD_APPLICATION_CREDENTIALS=path_to_your_credentials_file\nGOOGLE_CLOUD_PROJECT_ID=your_google_cloud_project_id\nBQANALYTIC_BQ_TABLE_NAME=your_bigquery_datasets_name\nGOOGLE_CLOUD_APPLICATION_NAME=your_google_cloud_application_name\n```\n\nThen \n\n``` bash\n$ php artisan migrate\n```\n\n\nAfter that\n\n``` bash\n$ php artisan db:seed --class=AnalyticSeeder\n```\n\nIf you an error popup when running the command above, you need to publish the vendor file.\n\n## Usage\n\nInclude this code into your user entity\n\n``` php\nuse RezuanKassim\\BQAnalytic\\Traits\\hasAnalyticPreferences;\n\n....\n\nclass User extends Authenticatable\n{\n    use Notifiable, hasAnalyticPreferences;\n```\n\nThen run ```php artisan bqanalytic:export``` to export big query data into your local database\n\nNote 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```\n\nNext, in your controller\n\n``` php\nuse RezuanKassim\\BQAnalytic\\BQAnalytic;\n\n...\n\n$results = (new BQAnalytic(auth()-\u003euser(), Carbon::createFromFormat('d/m/Y', $range[0])-\u003eformat('Ymd'), Carbon::createFromFormat('d/m/Y', $range[1])-\u003eformat('Ymd')))-\u003egetAllAnalytics()[config('bqanalytic.google.accounts')[0]['name']];\n```\n\nOptionally you can enable multiple project by \n\n```\nBQANALYTIC_MULTIPLE_PROJECTS=true\n```\n\nsetting this variable in your env and publishing the config file\n\nand insert the code below in ```google =\u003e [accounts =\u003e [here]] ```\n\n``` php\n    [\n        'name' =\u003e 'YOUR_PROJECT_NAME',\n        'google_credential' =\u003e \"FULL_PATH_TO_YOUR_CREDENTIALS\",\n        'google_project_id' =\u003e 'PROJECT_ID',\n        'google_bq_dataset_name' =\u003e 'YOUR_DATASET_NAME'\n    ]\n```\n\nBy version 1.3, you are able to store all the clients in the database if you wish\n\n```\nBQANALYTIC_CLIENT_FROM_DB=true\n```\nin .env file\n\nThis will use an included ``` RezuanKassim\\BQAnalytic\\BQClient ``` model to store the clients information\n\nOptionally you also can use own model by including\n\n```\nBQANALYTIC_CLIENT_MODEL=App\\Client\n```\nin .env file\n\nBut remember to include these codes in your client model\n\n``` php\nuse RezuanKassim\\BQAnalytic\\Traits\\hasClientFromDB;\n\n...\n\nclass Client extends Model\n{\n    use hasClientFromDB;\n\n    protected $table = 'bq_clients';\n\n    protected $guarded = ['created_at', 'updated_at', 'id'];\n\n    protected $casts = [\n        'status' =\u003e 'boolean'\n    ];\n}\n```\n\n\n## Change log\n\nPlease see the [changelog](changelog.md) for more information on what has changed recently.\n\n## Testing\n\n``` bash\n$ composer test\n```\n\n## Contributing\n\nPlease see [contributing.md](contributing.md) for details and a todolist.\n\n## Security\n\nIf you discover any security related issues, please email author email instead of using the issue tracker.\n\n## Credits\n\n- [author name][link-author]\n- [All Contributors][link-contributors]\n\n## License\n\nlicense. Please see the [license file](license.md) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/rezuankassim/bqanalytic.svg?style=flat-square\n\u003c!-- [ico-downloads]: https://img.shields.io/packagist/dt/rezuankassim/bqanalytic.svg?style=flat-square\n[ico-travis]: https://img.shields.io/travis/rezuankassim/bqanalytic/master.svg?style=flat-square\n[ico-styleci]: https://styleci.io/repos/12345678/shield --\u003e\n\n[link-packagist]: https://packagist.org/packages/rezuankassim/bqanalytic\n[link-downloads]: https://packagist.org/packages/rezuankassim/bqanalytic\n[link-travis]: https://travis-ci.org/rezuankassim/bqanalytic\n[link-styleci]: https://styleci.io/repos/12345678\n[link-author]: https://github.com/rezuankassim\n[link-contributors]: ../../contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frezuankassim%2Fbqanalytic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frezuankassim%2Fbqanalytic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frezuankassim%2Fbqanalytic/lists"}