承接 hirale/openmage-ga4-measurement 相关项目开发

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

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

hirale/openmage-ga4-measurement

最新稳定版本:v1.1.1

Composer 安装命令:

composer require hirale/openmage-ga4-measurement

包简介

A module for integrating with the Google Analytics 4 Measurement Protocol API

README 文档

README

A module for integrating with the Google Analytics 4 Measurement Protocol API, sending events from server side.

This module can work with Mage_GoogleAnalytics module. For duplicate key events, you can consult this page https://support.google.com/analytics/answer/12313109?hl=en

Supported Events

  • page_view
  • begin_checkout
  • add_to_cart
  • remove_from_cart
  • view_cart
  • purchase
  • view_item
  • view_item_list
  • add_to_wishlist
  • sign_up
  • login
  • search
  • view_search_results

You can check more events in the events section.

Install

Note

This module depends on openmage-redis-queue. It has been added to composer requirements.

Install with Magento Composer Installer

composer require hirale/openmage-ga4-measurement

Usage

Setup

  1. Generate an API SECRET in the Google Analytics UI. To create a new secret, navigate to Admin > Data Streams > choose your stream > Measurement Protocol > Create.
  2. Get measurement ID associated with a stream, found in the Google Analytics UI under Admin > Data Streams > choose your stream > Measurement ID.
  3. Go to openmage system config System > Configuration > Sales > Google API > Measurement Protocol. Insert the parameters from step 1 and 2, save.

Debug

Enable debug mode in the openmage system config System > Configuration > Sales > Google API > Measurement Protocol.

2024-06-10T18:28:24+00:00 DEBUG (7): {"client_id":"2131884568.1715846325","timestamp_micros":1718044092903759,"non_personalized_ads":false,"user_id":"140","events":[{"name":"page_view","params":{"engagement_time_msec":1,"page_location":"https://example.com/customer/account/index/","page_title":"Create New Customer Account"}}]}
2024-06-10T18:28:24+00:00 DEBUG (7): {
  "validationMessages": [ ]
}

License

The Open Software License v. 3.0 (OSL-3.0). Please see License File for more information.

统计信息

  • 总下载量: 32
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2024-06-04