You can use our client-side APIs to:

  • Bring in additional data that Heap does not autocapture, including custom events and properties
  • Manage user identity across browsers, sessions, and in situations where multiple users are accessing the same device
  • Capture mobile events via the iOS/Android Event Visualizer

We have server-side equivalents of several of our client-side APIs, such as track and addUserProperties. If you’re unsure whether to bring in this data via the client or server-side, see Tracking Web Custom Events Client-side vs. Server-side.

Prerequisites

Before using our client-side APIs, you’ll need to have installed Heap on your website or app. For installation instructions for web, mobile, react native, and third-party platforms, jump to our developer guides.

Note that select APIs have their own individual prerequisites, as listed in each API section below.

TypeScript Type Definitions

interface Heap {
  track: (event: string, properties?: Object) => void;
  identify: (identity: string) => void;
  resetIdentity: () => void;
  addUserProperties: (properties: Object) => void;
  addEventProperties: (properties: Object) => void;
  removeEventProperty: (property: string) => void;
  clearEventProperties: () => void;
  appid: string;
  userId: string;
  identity: string | null;
  config: any;
}

Feel free to reach out to [email protected] with any questions about our APIs.

Did you find what you were looking for?
Thumb up Thumb down