kunoichi/ga-communicator
Composer 安装命令:
composer require kunoichi/ga-communicator
包简介
Communicate with Google Analytics API.
README 文档
README
Tags: google-analytics, api
Contributors: tarosky, Takahashi_Fumiki
Tested up to: 6.2
Requires at least: 5.9
Requires PHP: 7.2
Stable Tag: nightly
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
Let your WordPress communicate with Google Analytics API.
Description
This plugin has custom functions to connect with Google Analytics.
NOTICE: Google will stop Universal Analytics(UA) at July 1st, 2023. Since then, you will be able to create only Google Analytics 4(GA4) accounts. API for UA is Core Reporting API, and one for GA4 is Google Analytics Data API. This API change is a breaking change. Please see our wiki to check what you should do for the migration.
Default Feature
- Setting screen. You can check the connection and set up GA tags.
- Popular posts widget.
Register Service Account and Setup
To communicate with Google Analytics, WordPress needs permission to do so.
Service Account works as permission.
Get the service account key at Google API Console(document).
A service account is like a bot with email and performs like a virtual Google account.
- Create a service account. You may be requested to create a new project, or else you can also use an existing project. The bot belongs to the project.
- Get private key in JSON format for the service account.
- Enable Analytics Reporting API and Google Analytics API for the project.
- Copy the service account's email address and add it to a member of your Google Analytics account, properties, or profiles. It depends on your Google Analytics permission policy.
- Go to your WordPress admin Setting > Google Analytics Setting and save the private key that you get in step 2.
NOTICE: Save whole credentials including empty line with ⌘+A and ⌘+C. Otherwise, your key will be considered invalid by Google's API.
If the service account is valid, you can see your Google Analytics Properties in your WordPress Admin screen.
Custom Use
If the setup is ready, you can communicate with Google Analytics through the function ga_communicator_get_report( $config ). It's a utility function to access batchGet API.
Please visit our Wiki to find many code examples.
Installation
From Plugin Repository
Click install and activate it.
Via Composer
You can install this plugin as a composer library. See our Wiki.
FAQ
Where can I get support?
Please create a new ticket on the support forum.
How can I contribute?
Create a new issue or send pull requests.
Changelog
3.7.1
- Fix setting error on individual activation under network install.
3.0.0
- Add Google Analytics Data API support. Core Reporting API will be deprecated in 2023.
- Drop support for PHP 5.6
2.0.0
- Works as a single WordPress plugin.
1.0.0
- First release as composer library.
kunoichi/ga-communicator 适用场景与选型建议
kunoichi/ga-communicator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12.88k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2020 年 06 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 kunoichi/ga-communicator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kunoichi/ga-communicator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 12.88k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2020-06-12