Skip to main content

Class: BrowserAnalytics

Types.BrowserAnalytics

The interface for SlashID user analytics.

We've built user analytics right into SlashID. We automatically track user activity surrounding sign-up & log-in so we can give you metrics like monthly active users (MAU), returning users, and new users.

Further, we record how people are choosing to authenticate with SlashID and expose this data to you so you can understand user preferences regarding authentication methods, and crucially: any friction caused by requiring that a particular authentication method or combination of authentication methods (MFA) be used.

Hierarchy

Constructors

constructor

new BrowserAnalytics(__namedParameters)

Parameters

NameType
__namedParametersBrowserAnalyticsOptions

Overrides

BaseAnalytics.constructor

Methods

identify

identify(user): void

Identifies a user for the purpose of user activity tracking. Where possible user identification is done automatically.

Parameters

NameTypeDescription
userBaseUserThe user being identified.

Returns

void

Inherited from

BaseAnalytics.identify


logout

logout(): void

Logs the user out from the point-of-view of the BaseAnalytics class only, this method does not have a side-effect which affects the logged in state of the user.

After removing a stored token this method should be called to record the log out event.

Returns

void

Inherited from

BaseAnalytics.logout


trackVirtualPageView

trackVirtualPageView(options): void

Tracks a virtual page view

A virtual page view allows you to track a page view, even when a page is not physically loaded in the browser. For example, when navigating using a client-side router in a single page application, or navigating within a sub-section of a page (like a tabbed pane, or navigation drawer) without changing the page itself.

The exact meaning of a virtual page view will vary by implementation, it depends on your routing paradigm and what you're trying to track. You will need to implement this event in a way which makes sense for your product.

Parameters

NameTypeDescription
optionsObject-
options.url?stringThe URL of the page to track as the subject of the virtual page view.
options.userAgent?string-

Returns

void

Overrides

BaseAnalytics.trackVirtualPageView