1.0.0 • Published 1 year ago

@hackler/amplitude-plugin v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Hackle Amplitude Plugin

Install

npm install @hackler/amplitude-plugin --save

Usage

Install & add Amplitude plugin

import { add } from "@amplitude/analytics-browser"
import { createInstance } from "@hackler/javascript-sdk"
import { HackleAmplitudePlugin } from "@hackler/amplitude-plugin"

const hackleClient = Hackle.createInstance("YOUR_SDK_KEY")
add(new HackleAmplitudePlugin(hackleClient))

Record events

import { track } from "@amplitude/analytics-browser"

track(EVENT_KEY, eventProperties)
// or
hackleClient.track({ key: EVENT_KEY, properties: eventProperties })