Appboy initialize handler

1.6k Views Asked by At

I am using the appboy web sdk. How do I know when app boy is initialized and ready for calling functions on it? Is there a function to know when appboy is ready. Also is the initialize and open session is functions that synchronous?

2

There are 2 best solutions below

0
On BEST ANSWER

An easy way to tell if the Appboy Web SDK has been successfully initialized is to call change user function. If Appboy was initialized correctly, you will be able to pull up a user profile within Braze's dashboard that matches the userID string passed into the changeUser function.

If you want more details, check out Braze's documentation about integrating their Web SDK.

Hope this helps.

0
On

If you use the CDN installation, you can start to use braze or appboy methods immediately since it defines a temporary variable that gets enqueued.

Calling initialize is synchronous, so there's nothing else you have to wait for to check if the SDK is ready.

Both initialize, openSession are synchronous and don't take callbacks: https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#opensession