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:

  1. Generated an access token.
  2. Created the event body.
  3. Validated the event body using the Meta Payload Helper.
  4. 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:

  1. Generated an access token.
  2. Created the event body.
  3. Validated the event body using the Meta Payload Helper.
  4. 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
Add a comment  | 

1 Answer 1

Reset to default 0

After 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.

本文标签: