Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 1.37 KB

File metadata and controls

52 lines (34 loc) · 1.37 KB

@screeb/sdk-ionic-example

Screeb's example app for Ionic (Angular + Capacitor).

Documentation: developers.screeb.app/sdk-js/sdk-ionic

Get started

Before getting started

This package requires the installation of the whole mono-repository.

See getting started guide for more information.

Getting set up

npm start

Then go to http://localhost:5173/

Features demonstrated

  • InitializationScreebModule.forRoot() in main.ts with channel ID, user ID and properties
  • Event trackingeventTrack() on page view and button click
  • Identity propertiesidentityProperties() to update visitor attributes
  • Group assignmentidentityGroupAssign() to segment users into cohorts
  • Programmatic surveysurveyStart() triggered from a button
  • Identity resetidentityReset() on logout
  • Multi-page navigation — two Ionic pages (Home + Profile) to show tracking across routes

Running on a real device (Capacitor)

To run this example as a native iOS/Android app with Capacitor:

# Build the web app
npm run build

# Add platforms
npx cap add android
npx cap add ios

# Sync and open
npx cap sync
npx cap open android   # or ios

License

Released under MIT License.