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.