SDK Integration
How to report events to STATEWIZE
Integrating with STATEWIZE is designed to be simple and quick;
Install our SDK (Currently supporting Javascript & NodeJS, more languages coming soon) 🔍
Download your journey integration map (available on the floating menu, on any journey page) 👀
3. Fetch your API key from your Settings page
4. Initialise the SDK:
5. Report events (see below)
Real-time monitoring & tracking
When your user starts a journey:
Reporting an event (a step) of a journey:
Updating a previously-reported event (i.e new data available - or it's an asynchronous event which starts at one time and ends later, etc):
Child events (which are occurring as part of a different event):
Journey Ended
And that's it!
A few notes;
Reporting an event without starting a journey - is possible. If you do so - the relevant journey will be found, started, and then an event will be reported.
You don't have to split an event into
started
andfinished
- you can report it asfinished
on the first call - it's all up to you, however you'd like the tracking to take place.STATEWIZE allows you to use your own ID by providing a
yourId
field in various SDK methods. This can be helpful when you have a known ID which you'd like to maintain for subsequent journey tracking purposes, instead of persisting the ID returned from STATEWIZE.Environments - You can set your environment in the constructor of the
StatewizeClient
, as well as on thestartJourney
event. An environment can be any of the following: [development
,testing
,staging
,production
].
Last updated