How can I check if an event is triggering a survey in my development environment?
### For web surveys: When an event is tracked through the Sprig Web SDK, we'll return a JSON payload as part of the response. Please note that the recontact waiting period is not enforced in development environments. Inside this payload, you can check the `questions` key: - An empty array denotes that the visitor is not eligible for a survey. - If you are expecting a survey to be seen, double check the visitor ID (e.g. `Sprig.visitorID` in your console, or local storage) and ensure you meet all the event and attribute criteria on your survey. - An array of questions denotes that the visitor was seen as eligible for a survey. - If a time delay is set on the survey, we will then wait for that amount of time to lapse before attempting to surface the survey to your visitor. ### For mobile surveys: When an event is tracked through the Sprig iOS or Android SDK, we'll return a JSON payload as part of the response. Please note that the recontact waiting period is not enforced in development environments. If you are able to examine the payload, you can check the `questions` key, similar to the Web SDK, to see whether or not a visitor is eligible for a survey. If a survey is not appearing, please double check that you are setting the necessary events and attributes to make your testing visitor record eligible for the survey.
Posted by Sprig 8 months ago
Does Sprig enforce recontact waiting periods in development environments?
For testing purposes, a Sprig visitor record will always see a survey in development Sprig environments, as long as they meet the qualifying event and attribute filters, regardless of when they last saw a prior survey. The recontact waiting period is enforced in production Sprig environments, and will not show a survey to a Sprig visitor record based on the recontact waiting period defined in your Settings.
Posted by Jonathan Hernandez 8 months ago