All Ripe SDK Calls

On this page, we cover all the available calls available in the Ripe SDK.

Ripe.identify

When you set a unique identifier for a lead/user, preferably an id from your database, this should be called. Call this every time a user logs in or updates any of the attached traits e.g. email etc.

If a user_id is not provided an automatically generated anonymous_id will be used.

Ripe.identify(identify_object)
identify_object: {
 userId?: string | null
 traits?: Record<string, unknown>
}

It's important to always share email and format it like in the example whenever it's known. This enables us to enrich and group your leads into companies inside the Ripe app.

Here is an example of what you send could look like:

Ripe.identify({
    userId: "abc123ijk456",
    traits: {
        firstName: "Steve",
        lastName: "Jobs",
        email: "steve@apple.com",
    },
});

There are other reserved traits that we may use now or in the future so map appropriate data to them whenever it's available. You can get a full list of them here.

Ripe.track

Use track calls to record what actions your lead/user performs along with properties related to the track call.

Ripe.track(event_object)
 event_object: {
  event: string
  properties?: Record<string, unknown>
 }

Ripe.page

Use page calls to track what pages your users visit. This should be called on each page load in a traditional web page and on route changes in SPA applications.

Ripe.track(page_object)
 page_object: {
  properties?: Record<string, unknown>
 }

Ripe.reset

This method is called when you want to clear the current tracked user. This clears the internal state of the RipeSDK together with clearing any uid:s set to localStorage.

You should call this whenever a user signs out.

Ripe.group

The group call is not required in order to access the full feature set of Ripe, skip this unless you know what you're doing.

This method is used to identify a workspace or account that a lead/user belongs to. The group_id is preferably an id from your database.

Ripe.group(group_object)
group_object: {
  groupId: "string",
  traits?: Record<string, unknown>
 }

Last updated