Fix indentify typo

This commit is contained in:
fragosti 2018-07-12 18:20:46 -07:00
parent 1df074b73e
commit 65af78c85d
2 changed files with 4 additions and 4 deletions

View File

@ -114,7 +114,7 @@ export class SubscribeForm extends React.Component<SubscribeFormProps, Subscribe
const response = await backendClient.subscribeToNewsletterAsync(this.state.emailText); const response = await backendClient.subscribeToNewsletterAsync(this.state.emailText);
const status = response.status === 200 ? SubscribeFormStatus.Success : SubscribeFormStatus.Error; const status = response.status === 200 ? SubscribeFormStatus.Success : SubscribeFormStatus.Error;
if (status === SubscribeFormStatus.Success) { if (status === SubscribeFormStatus.Success) {
analytics.indentify(this.state.emailText, 'email'); analytics.identify(this.state.emailText, 'email');
} }
this.setState({ status, emailText: '' }); this.setState({ status, emailText: '' });
} catch (error) { } catch (error) {

View File

@ -4,7 +4,7 @@ import { utils } from 'ts/utils/utils';
export interface HeapAnalytics { export interface HeapAnalytics {
loaded: boolean; loaded: boolean;
indentify(id: string, idType: string): void; identify(id: string, idType: string): void;
track(eventName: string, eventProperties?: ObjectMap<string | number>): void; track(eventName: string, eventProperties?: ObjectMap<string | number>): void;
resetIdentity(): void; resetIdentity(): void;
addUserProperties(properties: ObjectMap<string | number>): void; addUserProperties(properties: ObjectMap<string | number>): void;
@ -30,8 +30,8 @@ export class Analytics {
} }
// tslint:disable:no-floating-promises // tslint:disable:no-floating-promises
// HeapAnalytics Wrappers // HeapAnalytics Wrappers
public indentify(id: string, idType: string): void { public identify(id: string, idType: string): void {
this._heapLoadedGuardAsync(() => this._heap.indentify(id, idType)); this._heapLoadedGuardAsync(() => this._heap.identify(id, idType));
} }
public track(eventName: string, eventProperties?: ObjectMap<string | number>): void { public track(eventName: string, eventProperties?: ObjectMap<string | number>): void {
this._heapLoadedGuardAsync(() => this._heap.track(eventName, eventProperties)); this._heapLoadedGuardAsync(() => this._heap.track(eventName, eventProperties));