Skip to Content
OpenAI CAPITesting data sent to OpenAI

Testing data sending to OpenAI

The Validate only option

Unlike Meta, OpenAI does not provide a test code to enter in the tag. Instead, the Conversions API offers a validation mode: when the validate_only parameter is true, OpenAI checks the structure of the event and returns any errors, without recording the conversion.

In the OpenAI CAPI tag, set the Validate only field to true.

Validate only option in the OpenAI CAPI tag

This field also accepts a variable. For example, you can use a variable that returns true only in preview mode, so that no real events are ever sent from debug mode.

Reading OpenAI’s response

Start the preview of your server container and trigger an event on your site. In the preview, click the OpenAI Conversions API tag, then the outgoing request to bzr.openai.com: a successful response (HTTP 2xx) confirms that the event structure is accepted, while an error response details the field to fix (missing currency, invalid custom event name, timestamp outside the allowed window).

It is not recommended to keep Validate only set to true in the OpenAI Conversions API tag in production: no conversion would be recorded. Remember to set it back to false before publishing your server container.