承接 collab/module-consent-mode 相关项目开发

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

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

collab/module-consent-mode

Composer 安装命令:

composer require collab/module-consent-mode

包简介

Cookie Consent Mode Popup Extension for Magento 2

README 文档

README

The Collab_ConsentMode module extends native Magento_Cookie module in following ways:

  • if Collab_ConsentMode is enabled and Cookie Restriction Mode is set to "Yes" native consent popup is extended with additional checkboxes (for user preferences) and additional buttons which will let them save theirs preferences.

The Collab_ConsentMode module works in following way:

  • by default (when user visitis the page for the first time) we are presenting the user with the consent popup
  • on initial visit gtag is fired with following options, those options are saved in the local storage
gtag('consent', 'default', {
    'ad_storage': 'denied',
    'ad_user_data': 'denied',
    'ad_personalization': 'denied',
    'analytics_storage': 'denied'
})

Please mind that this initialization needs to be done as soon as possible (at least before GTM script is fired) so we are loading gtag's template (block name consent.initializer) in head.additional block with before="-" argument. If Your project is using customized layout please make sure that consent.initializer is first block in Yours head.additional block or it is placed at least before GTM init script.

  • if user changes his preferences, we are firing gtag with new options and saving them in the local storage
  • if user visits the page again, we are checking if there are any preferences saved in the local storage and if so we are just using them
  • user has an ability to change his preferences at any time by visiting CMS Page with the consent form (module is shipped with dedicated widget for that)

Configuration

You can configure the module in the admin panel under Stores > Configuration > Collab Extensions > Google Consent Mode v2.

Tab Config Field Description
General Enabled (bool: Select) If Yes then native consent popup is extended by functionalities provided by this module.
General Url Passthrough (bool: Select) If Yes then minimal information about vistors is passed even without consent. More: gTag Passthrough
General Is Reject Button Visible (bool: Select) If Yes then Reject button is visible in the consent popup.
GGeneral Reject Button Behaviour (select: Select) If Reject button is visible then you can choose what happens when user clicks on it. Native means that Magento functionality is preserved, 'Save Minimal Set Of Preferences' means that only necesarry checkbox is saved and popup is closed.

Installation details

composer require collab/module-consent-mode
bin/magento setup:upgrade

Screenshots

Consent Widget Embeded in CMS Page

collab/module-consent-mode 适用场景与选型建议

collab/module-consent-mode 是一款 基于 HTML 开发的 Composer 扩展包,目前已累计 1.9k 次下载、GitHub Stars 达 12, 最近一次更新时间为 2024 年 02 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「google analytics」 「banner」 「magento」 「google ads」 「magento2」 「cookie banner」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 collab/module-consent-mode 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 collab/module-consent-mode 我们能提供哪些服务?
定制开发 / 二次开发

基于 collab/module-consent-mode 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.9k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 12
  • 点击次数: 18
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 12
  • Watchers: 4
  • Forks: 1
  • 开发语言: HTML

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-02-22