@xylabs/sdk-react
    Preparing search index...

    Class Fbq

    Implements

    Index

    Properties

    Accessors

    Methods

    Properties

    pixelId: string

    Accessors

    • get fbq(): FbqFunction

      Gets the instance of the Facebook Pixel (fbq).

      Returns FbqFunction

      The global fbq instance.

      Will throw an error if the Fbq instance is not initialized.

    • get fbq(): FbqFunction

      Gets the instance of the Facebook Pixel (fbq).

      Returns FbqFunction

      The global fbq instance.

      Will throw an error if the Fbq instance is not initialized.

    Methods

    • Tracks a specified Facebook standard event using the Facebook Pixel. This will only call the pixel with the specified eventID.

      Parameters

      • event: FacebookStandardEventNames

        The Facebook standard event to track.

      • Optionaldata: JsonObject

        Optional additional data to send with the event.

      • OptionaleventID: string

        An optional unique identifier for the event.

      Returns void

    • Tracks a custom event using Facebook's tracking pixel. This will only call the pixel with the specified eventID.

      Parameters

      • event: string

        The name of the custom event to track.

      • data: JsonObject

        An object containing additional data to send with the event.

      • OptionaleventID: string

        An optional unique identifier for the event.

      Returns void

    • Initializes the Fbq instance with the given pixel ID.

      Parameters

      • pixelId: string

        The Facebook Pixel ID to initialize the Fbq instance with.

      Returns Fbq

      A new instance of Fbq.

      Will throw an error if the Fbq instance is not initialized.

    • Tracks a Facebook standard event using the Facebook Pixel. This will call all initialized pixels.

      Parameters

      • event: FacebookStandardEventNames

        The Facebook standard event to track.

      • Optionaldata: JsonObject

        Optional additional data to send with the event.

      • OptionaleventID: string

        An optional unique identifier for the event.

      Returns void

    • Tracks a custom event using Facebook's tracking pixel. This will call all initialized pixels.

      Parameters

      • event: string

        The name of the custom event to track.

      • data: JsonObject

        An object containing additional data to send with the event.

      • OptionaleventID: string

        An optional unique identifier for the event.

      Returns void