@objectiv/transport-snowplow-browser
TypeScript icon, indicating that this package has built-in type declarations

0.0.27-experimental.6 • Public • Published

Objectiv Snowplow Browser Tracker Transport

Allows sending events directly via Snowplow's Browser Tracker without the need of the Objectiv Collector.


Package Installation

To install the most recent stable version:

yarn add @objectiv/transport-snowplow-browser

or

npm install @objectiv/transport-snowplow-browser

Usage

To enable SnowplowBrowserTransport, and stop using Objectiv's Collector, simply:

  1. Remove the Objectiv's Collector endpoint configuration option.
  2. Add the transport configuration option, set to a new instance of SnowplowBrowserTransport.

Browser SDK example

import { makeTracker } from "@objectiv/tracker-browser";
import { SnowplowBrowserTransport } from "@objectiv/transport-snowplow-browser";

makeTracker({
  applicationId: 'app-id',
  transport: new SnowplowBrowserTransport()
});

React SDK example

import { ReactTracker } from '@objectiv/tracker-react';
import { SnowplowBrowserTransport } from "@objectiv/transport-snowplow-browser";

const tracker = new ReactTracker({
  applicationId: 'app-id',
  transport: new SnowplowBrowserTransport()
})

Angular SDK example

import { ObjectivTrackerModule } from '@objectiv/tracker-angular';
import { SnowplowBrowserTransport } from "@objectiv/transport-snowplow-browser";

...

@NgModule({
  ...
  imports: [
    ...
    ObjectivTrackerModule.forRoot({
      applicationId: 'app-id',
      transport: new SnowplowBrowserTransport()
    })
  ],
  ...
})

export class AppModule {
  ...
}

Copyright and license

Licensed and distributed under the Apache 2.0 License (An OSI Approved License).

Copyright (c) 2022 Objectiv B.V.

All rights reserved.

Dependencies (1)

Dev Dependencies (8)

Package Sidebar

Install

npm i @objectiv/transport-snowplow-browser

Homepage

objectiv.io

Weekly Downloads

1,125

Version

0.0.27-experimental.6

License

Apache-2.0

Unpacked Size

19.3 kB

Total Files

7

Last publish

Collaborators

  • borft
  • sdirosa