Configure callbacks to call functions when the SDK sends information to Adjust. You can configure callbacks for sessions and events.
Session callbacks
Configure session callbacks to call functions when the SDK sends session information. You can configure success callbacks and failure callbacks. Success callbacks are called when the SDK sends information to Adjust's servers. Failure callbacks are called when the SDK encounters a problem while sending the information.
Session callbacks have access to a response data object. You can use its properties in your callback function.
Property | Type | Description |
---|---|---|
message | std::string | The message from the server or the error logged by the SDK. |
timestamp | std::string | The timestamp from Adjust's servers. |
adid | std::string | A unique device identifier provided by Adjust. |
jsonResponse | std::string | The JSON object with the response from the server. |
willRetry | bool | Indicates whether there will be an attempt to resend a failed package. Available only on failure callbacks. |
Success callbacks
Configure a success callback to call a function when the SDK records a session.
Failure callbacks
Configure a failure callback to call a function when the SDK fails to record a session.
Event callbacks
Configure event callbacks to call a function when the SDK sends event information. You can configure success callbacks and failure callbacks. Success callbacks are called when the SDK sends information to Adjust's servers. Failure callbacks are called when the SDK encounters a problem while sending the information.
Event callbacks have access to a response data object. You can use its properties in your callback function.
Property | Type | Description |
---|---|---|
message | std::string | The message from the server or the error logged by the SDK. |
timestamp | std::string | The timestamp from Adjust's servers. |
adid | std::string | A unique device identifier provided by Adjust. |
eventToken | std::string | The event token |
callbackId | std::string | The custom callback ID set on the event object |
jsonResponse | std::string | The JSON object with the response from the server. |
willRetry | bool | Indicates whether there will be an attempt to resend a failed package. Only available on failure callbacks. |
Success callbacks
Configure a success callback to call a function when the SDK records an event.
Failure callbacks
Configure a failure callback to call a function when the SDK fails to record an event.