Skip to main content
This guide helps you navigate Meta Business SDK advanced features designed especially for Conversions API users. Asynchronous Requests, Concurrent Batching, and HTTP Service Interface are available in the PHP, NodeJS, Java, Python, and Ruby SDKs. For basic Conversions API usage, refer to the main Conversions API documentation. The Meta Business SDK gives you access to our suite of business APIs allowing you to build unique and customized solutions to serve your businesses and clients. One of the APIs available for SDK users is the Conversions API.

Requirements

Before using any of the features listed below, you need to have the Meta Business SDK installed. See Get Started with the Meta Business SDK or the follow the README instructions listed here: Minimum language version required to use these features:
  • PHP >= 7.2
  • Node.js >= 7.6.0
  • Java >= 8
  • Python >= 2.7
  • Ruby >= 2

Asynchronous Requests

Use this feature if you do not want to block your program’s execution to wait for a request to be completed. With this approach, you make your request and get a signal back from the server once it has been completed. While you wait for the response, the program can keep executing. Asynchronous requests allow you to use your resources more efficiently which leads to a decrease in server response time. This also allows you to have more control on how your program handles errors coming from the server and to easily integrate the SDK into code that already runs asynchronously. To implement Asynchronous Requests, see code samples in the following languages: PHP SDKPython SDKNode.js SDKJava SDKRuby SDK

Concurrent Batching

Concurrent batching leverages asynchronous requests to increase throughput by utilizing resources more efficiently. You can create batched requests to support use cases like event request workers, cron jobs, and more. You have the following BatchProcessor methods to choose from: When using concurrent batching, events should be sent as close to real-time as possible. For more information, see Sharing Frequency. If you are using the PHP, Python, or Ruby SDKs, the methods above require an EventRequestAsync object(s) instead of an EventRequest. To implement concurrent batching, see code samples in the following languages: PHP SDKPython SDKNode.js SDKJava SDKRuby SDK

HTTP Service Interface

Use HTTP Service Interface if you have a specific set of requirements for the HTTP service layer. With this feature, you can override the Business SDK’s default HTTP service and implement your own custom service with your preferred method or library. To implement your own HTTP Service Interface, see code samples in the following languages: PHP SDKPython SDKNode.js SDKJava SDKRuby SDK

Test Your Event Requests

You can test your event requests using the test_event_code parameter. Locate the test code by going to the Test Events tool found in the Events Manager under Data Sources > Your Pixel > Test Events tab. Note: You must replace the sample value in the code below (i.e., TEST12345) with the test code you obtain from the Test Events tab. PHP SDKPython SDKNode.js SDKJava SDKRuby SDK

Limitations

Currently, we do not support setting a custom HTTP Service Interface when making concurrent batch requests or asynchronous requests.