@aics/frontend-insights-plugin-amplitude-node

Plugin to @aics/frontend-insights that ships user events to Amplitude. Suitable for use in a NodeJS-like environment, such as Electron.

Usage no npm install needed!

<script type="module">
  import aicsFrontendInsightsPluginAmplitudeNode from 'https://cdn.skypack.dev/@aics/frontend-insights-plugin-amplitude-node';
</script>

README

@aics/frontend-insights-plugin-amplitude-node

Plugin to @aics/frontend-insights that ships user events to Amplitude. Only suitable for use in a NodeJS-like environment, such as Electron, as the @amplitude/node package that this plugin provides a facade for relies on being able to require the HTTP and HTTPS NodeJS packages, among others.

References:

Usage

Required constructor argument(s):

  • options: { apiKey: string; }
const amplitudeNodePlugin = new AmplitudeNodePlugin({ apiKey: "abc123" });
const frontendInsights = new FrontendInsights({ ... }, [amplitudeNodePlugin]);