hirale / openmage-meta-conversions
Meta Conversion API 集成模块
v1.1.0
2024-06-14 19:16 UTC
Requires
This package is auto-updated.
Last update: 2024-09-14 19:47:55 UTC
README
一个用于集成 Meta Conversions API 的模块,从服务器端发送事件。
对于重复事件,您可以参考这个页面 https://developers.facebook.com/docs/marketing-api/conversions-api/deduplicate-pixel-and-server-events
如果您使用javascript发送像素事件,您可以像这样获取event_id。
Mage::helper('metaconversions')->getEventId();
支持的事件
AddToCart
AddToWishlist
CompleteRegistration
InitiateCheckout
Purchase
Search
ViewContent
PageView
ViewCart
您可以在 事件部分 查看更多事件。
安装
注意
此模块依赖于 openmage-redis-queue
。它已被添加到composer要求中。
使用 Magento Composer Installer 安装
composer require hirale/openmage-meta-conversions
使用方法
设置
- 此模块需要 openmage-redis-queue 模块,请在安装此模块之前查看。
- 生成访问令牌。请参阅 https://developers.facebook.com/docs/marketing-api/conversions-api/get-started。
- 转到系统配置
系统 > 配置 > 销售 > Meta API > Conversions API
。插入步骤1中的参数,保存。
调试
在系统配置中启用调试模式,然后检查您的系统日志。
2024-06-10T18:28:24+00:00 DEBUG (7): FacebookAds\Object\ServerSide\Event Object
(
[container:protected] => Array
(
[event_name] => PageView
[event_time] => 1718044092
[event_source_url] => https://example.com/customer/account/index/
[opt_out] =>
[event_id] => 666745bcdd76a
[user_data] => FacebookAds\Object\ServerSide\UserData Object
(
[container:protected] => Array
(
[emails] => Array
(
[0] => ok@example.com
)
[phones] => Array
(
[0] => 1234567894
)
[genders] => Array
(
[0] => f
)
[last_names] => Array
(
[0] => ok
)
[first_names] => Array
(
[0] => ok
)
[cities] => Array
(
[0] => ok
)
[states] => Array
(
[0] => Alaska
)
[country_codes] => Array
(
[0] => US
)
[zip_codes] => Array
(
[0] => 10010
)
[client_ip_address] => 172.20.0.1
[client_user_agent] => Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
[fbc] =>
[fbp] => fb.1.17984613648566.610809845
[subscription_id] =>
[fb_login_id] =>
[lead_id] =>
[f5first] =>
[f5last] =>
[fi] =>
[dobd] =>
[dobm] =>
[doby] =>
[madid] =>
[anon_id] =>
[ctwa_clid] =>
[page_id] =>
)
)
[custom_data] =>
[data_processing_options] =>
[data_processing_options_country] =>
[data_processing_options_state] =>
[action_source] => website
[app_data] =>
[advanced_measurement_table] =>
[messaging_channel] =>
)
)
2024-06-10T18:28:24+00:00 DEBUG (7): FacebookAds\Object\ServerSide\EventResponse Object
(
[container:protected] => Array
(
[events_received] => 1
[messages] => Array
(
)
[fbtrace_id] => AkuJqnm2pr421jM7d89SRqa
[custom_endpoint_responses] =>
)
)
许可证
开放软件许可证 v. 3.0 (OSL-3.0)。有关更多信息,请参阅 许可证文件。