skip to Main Content

I am trying to implement FB CAPI for my business and I set up a Purchase event and now I want to test it via Event Test Tool. I test it for webpage and EventTest Tool is tracking all the browser event but when i tried to track via server event I am not able to see any history in Server Events Tab.
The Request Format is:

Method: POST

Postman URL: https://graph.facebook.com/{{API_VERSION}}/{{PIXEL_ID}}/events?access_token={{TOKEN}}

Request Payload:

{
  "data": [
    {
      "event_name": "Purchase",
      "event_time": 1619508577,
      "action_source": "email",
      "user_data": {
        "em": "7b17fb0bd173f625b58636fb796407c22b3d16fc78302d79f0fd30c2fc2fc068"
      },
      "custom_data": {
        "currency": "USD",
        "value": "142.52"
      }
    }
  ],
  "test_event_code": "TEST7039"
}

Request Response:

{
  "events_received": 1,
  "messages": [
  ],
  "fbtrace_id": "AQqIVn-TahE83ocCagd4HKB"
}

As request response is successful but I am not able to see the event in Event Test Tool’s tab?

Browser Test Events Data:
enter image description here
Server Test Event Data:
enter image description here

2

Answers


  1. Chosen as BEST ANSWER

    So after alot of testing I came to know that UserAgent and IP address are required values to be passed in user data.

    Updated JSON:

    {
      "data": [
        {
          "event_name": "Purchase",
          "event_time": 1619508577,
          "action_source": "email",
          "user_data": {
            "em": "7b17fb0bd173f625b58636fb796407c22b3d16fc78302d79f0fd30c2fc2fc068",
            "client_ip_address": "yourIPAddress",
            "client_user_agent": "your userAgent"
          },
          "custom_data": {
            "currency": "USD",
            "value": "142.52"
          }
        }
      ],
      "test_event_code": "TEST7039"
    }
    

  2. same thing happen to me

    • and client_user_agent is not something you can write anything , you have to use proper client agent or it not going to show their

    JSON:

    {
      "data": [
        {
          "event_name": "Purchase",
          "event_time": 1619508577,
          "action_source": "email",
          "user_data": {
            "em": "7b17fb0bd173f625b58636fb796407c22b3d16fc78302d79f0fd30c2fc2fc068",
            "client_ip_address": "4.4.4.4",
            "client_user_agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0"
          },
          "custom_data": {
            "currency": "USD",
            "value": "142.52"
          }
        }
      ],
      "test_event_code": "TEST7039"
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search