承接 akki-io/laravel-google-analytics 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

akki-io/laravel-google-analytics

最新稳定版本:v12

Composer 安装命令:

composer require akki-io/laravel-google-analytics

包简介

A Laravel package to retrieve data from Google Analytics 4 using the GA4 Query Explorer

README 文档

README

Hero

Laravel Google Analytics

Latest Version GitHub Workflow Status (branch) StyleCI Software License Total Downloads

A Laravel package to retrieve data from Google Analytics 4 using the GA4 Query Explorer

TL;DR

Using this package you can easily retrieve data from Google Analytics 4.

Below are some examples.

use AkkiIo\LaravelGoogleAnalytics\Facades\LaravelGoogleAnalytics;
use AkkiIo\LaravelGoogleAnalytics\Period;
use Google\Analytics\Data\V1beta\Filter\StringFilter\MatchType;
use Google\Analytics\Data\V1beta\MetricAggregation;
use Google\Analytics\Data\V1beta\Filter\NumericFilter\Operation;

// get the top 20 most viewed pages for last 30 days
LaravelGoogleAnalytics::getMostViewsByPage(Period::days(30), $count = 20);

// get the top 20 dates with most users for last 12 months
LaravelGoogleAnalytics::getMostUsersByDate(Period::months(12), $count = 20);

// build a query using the `get()` method
LaravelGoogleAnalytics::dateRanges(Period::days(30), Period::days(60))
    ->metrics('active1DayUsers', 'active7DayUsers')
    ->dimensions('browser', 'language')
    ->metricAggregations(MetricAggregation::TOTAL, MetricAggregation::MINIMUM)
    ->whereDimension('browser', MatchType::CONTAINS, 'firefox')
    ->whereMetric('active7DayUsers', Operation::GREATER_THAN, 50)
    ->orderByDimensionDesc('language')
    ->get();

Please refer to the wiki for more details.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email hello@akki.io instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 113.03k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 49
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 49
  • Watchers: 4
  • Forks: 23
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-02-13