HomeDocumentationAPI Reference
Getting StartedAPI ReferenceBug ReportingCrash ReportingAPMHelp Center
These docs are for v8.1. Click to read the latest docs for v12.0.0.

Event Handlers

Covered here is how to set up the event handler that fires before and after every survey is shown.

You can execute code in a handler that gets called before a survey is shown and after it has been dismissed. You can use this for things like pausing and resuming a game, for example.

Before Showing the Survey

Surveys.onShowCallback(() => {
  //Perform any changes before the survey appears.
});

After the Survey Has Been Dismissed

Surveys.onDismissCallback(() => {
  //Perform any changes before the survey disappears.
});

What’s Next

Do more with event handlers, like adding user attributes and events as well as additional logs.