Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,21 @@ export interface Flags {
}

export class Autocapture {
/**
* Track a screen view event.
*
* @param screenName The name of the screen being viewed. Must be non-empty;
* if an empty or whitespace-only string is passed, the event is silently dropped.
* @param properties Optional additional properties to include with the event
*/
trackScreenView(screenName: string, properties?: MixpanelProperties): void;
/**
* Track a screen leave event.
*
* @param screenName The name of the screen being left. Must be non-empty;
* if an empty or whitespace-only string is passed, the event is silently dropped.
* @param properties Optional additional properties to include with the event
*/
trackScreenLeave(screenName: string, properties?: MixpanelProperties): void;
}

Expand Down
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,8 @@ export class Autocapture {
/**
* Track a screen view event.
*
* @param {string} screenName The name of the screen being viewed
* @param {string} screenName The name of the screen being viewed. Must be non-empty;
* if an empty or whitespace-only string is passed, the event is silently dropped.
* @param {object} properties Optional additional properties to include with the event
*/
trackScreenView(screenName, properties) {
Expand All @@ -750,7 +751,8 @@ export class Autocapture {
/**
* Track a screen leave event.
*
* @param {string} screenName The name of the screen being left
* @param {string} screenName The name of the screen being left. Must be non-empty;
* if an empty or whitespace-only string is passed, the event is silently dropped.
* @param {object} properties Optional additional properties to include with the event
*/
trackScreenLeave(screenName, properties) {
Expand Down
Loading