Skip to main content

Step 1 — Install the SDK

Step 2 — Create an Analytics Service

Run this command to generate a service:
Open src/app/analytics.service.ts and replace the entire contents with:
src/app/analytics.service.ts

Step 3 — Initialize in app.component.ts

Open src/app/app.component.ts:
src/app/app.component.ts

Step 4 — Track events in any component

src/app/home/home.component.ts

Step 5 — Identify users & reset

src/app/auth/auth.component.ts