Contentful Personalization & Analytics
    Preparing search index...

    Interface CoreStatelessInsightsOptions

    Request-bound Insights API options for stateless runtimes.

    interface CoreStatelessInsightsOptions {
        beacon?: (url: string, body: string) => boolean;
    }

    Hierarchy

    Index

    Properties

    Properties

    beacon?: (url: string, body: string) => boolean

    Sender used to enqueue serialized events via the Beacon API or a similar mechanism.

    Type Declaration

      • (url: string, body: string): boolean
      • Parameters

        • url: string

          Target URL for the batched events.

        • body: string

          Serialized batched insights events to be sent.

        Returns boolean

        true if the events were successfully queued, false otherwise.

    This option is intended for last-chance lifecycle delivery. If it returns false or throws, the client falls back to emitting events immediately via fetch with keepalive.