@objectiv/transport-snowplow-browser
Version:
Allows sending events directly via Snowplow's Browser Tracker without the need of the Objectiv Collector
23 lines (20 loc) • 928 B
TypeScript
import { TrackerTransportInterface, TrackerInterface, NonEmptyArray, TransportableEvent } from '@objectiv/tracker-core';
/**
* SnowplowBrowserTransport converts Objectiv's events to Snowplow's and sends them via Snowplow's Browser Tracker.
*/
declare class SnowplowBrowserTransport implements TrackerTransportInterface {
readonly transportName = "SnowplowBrowserTransport";
/**
* Retrieves some configuration options from the Tracker instance, for usability checks
*/
initialize(tracker: TrackerInterface): void;
/**
* Converts incoming TrackerEvents to Snowplow's payloads and sends them via snowplow's 'trackStructEvent'
*/
handle(...args: NonEmptyArray<TransportableEvent>): Promise<Response | void>;
/**
* Make this transport usable if trackStructEvent is defined, e.g. the peer module is available
*/
isUsable(): boolean;
}
export { SnowplowBrowserTransport };