Creates an instance of the Pixel class.
The API URL to be used for communication.
The ID of the container where the pixel will be initialized.
Optionaldebug: (...args: any) => voidAn optional debug function for logging debug information. It accepts any number of arguments.
The API URL to which pixel data will be sent.
The container ID associated with the pixel.
Sends tracking data to the specified API endpoint using a pixel image request.
The event data to be sent. This should be an object containing the necessary information for the tracking event.
Optionalcallback: () => voidAn optional callback function that will be executed when the pixel image has successfully loaded.
This method prepares the tracking data, logs it for debugging purposes, and sends it as a query string appended to the API URL. If a callback is provided, it will be triggered once the pixel image is loaded.
Represents a Pixel tracking utility for sending event data to a specified API endpoint.
Example