Skip to content

Analytics client for sending clickstream events to your Matterbeam instance.

Notifications You must be signed in to change notification settings

matterbeam-tech/matterbeam-analytics

Repository files navigation

Matterbeam Analytics

matterbeam-analytics is an analytics client for sending events to your Matterbeam instance.

This client is built using the analytics package.

Installation

npm install matterbeam-analytics

Usage

import matterbeam from "matterbeam-analytics";

const analytics = matterbeam({
  apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  customer: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
});

/* Track a page view */
analytics.page();

/* Track a custom event */
analytics.track("cart:product_purchased", {
  item: "Trading Cards",
  price: 20.99,
});

/* Identify a user */
analytics.identify("<USER_ID>", {
  firstName: "Bill",
  lastName: "Murray",
});

Configuration options

Option description
apiKey
required - string
API key for your matterbeam account
customer
required - string
Customer Id for your matterbeam account

About

Analytics client for sending clickstream events to your Matterbeam instance.

Resources

Stars

Watchers

Forks

Packages

No packages published