admin管理员组文章数量:1336660
I’m working on a Ruby on Rails app and integrating Meta’s Conversation API. Here’s what I’ve done so far:
- Generated an access token.
- Created the event body.
- Validated the event body using the Meta Payload Helper.
- Sent the events to analytics via the API.
POST ".0/#{PIXEL_ID}/events"
However, I don’t see any events appearing in the Test Events section of Meta Analytics.
Here is my body
body = {
data: [
{
event_name: "Purchase",
event_time: DateTime.current.to_i,
action_source: "other",
original_event_data: {
event_name: "Purchase",
event_time: DateTime.current.to_i
},
user_data: {
external_id: "12345"
},
value: 100.00,
custom_data: {
currency: "USD",
order_id: "67890",
price: 100.00,
revenue: 90.00,
item_id: "11111",
item_name: "Title",
purchase_type: "purchase_type",
platform: "Web",
discount: 10.00,
quantity: 1
}
}
].to_json,
access_token: "access_token"
}
I’m working on a Ruby on Rails app and integrating Meta’s Conversation API. Here’s what I’ve done so far:
- Generated an access token.
- Created the event body.
- Validated the event body using the Meta Payload Helper.
- Sent the events to analytics via the API.
POST "https://graph.facebook/v21.0/#{PIXEL_ID}/events"
However, I don’t see any events appearing in the Test Events section of Meta Analytics.
Here is my body
body = {
data: [
{
event_name: "Purchase",
event_time: DateTime.current.to_i,
action_source: "other",
original_event_data: {
event_name: "Purchase",
event_time: DateTime.current.to_i
},
user_data: {
external_id: "12345"
},
value: 100.00,
custom_data: {
currency: "USD",
order_id: "67890",
price: 100.00,
revenue: 90.00,
item_id: "11111",
item_name: "Title",
purchase_type: "purchase_type",
platform: "Web",
discount: 10.00,
quantity: 1
}
}
].to_json,
access_token: "access_token"
}
Share
Improve this question
edited Nov 20, 2024 at 15:05
VLAZ
29.1k9 gold badges63 silver badges84 bronze badges
asked Nov 19, 2024 at 15:37
Genry WoodGenry Wood
365 bronze badges
1 Answer
Reset to default 0After a few tries, I determined that my events weren't coming because the action_source
was other
. I changed it to web
and it started receiving events.
本文标签:
版权声明:本文标题:Events not showing in Test Events in Meta Analytics using Conversation API with Ruby on Rails - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742417494a2470998.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论