Event trigger in in-product survey allows you to display survey modals when a predefined event is triggered. Common examples of event triggers would be user sign ups or completing a purchase. Events can be flexibly defined as long as it is properly setup, but would require modifying the source code. Below is a walkthrough of setting up event triggers for in-product surveys.
Step 1. Make sure Hubble SDK is installed and setup for your product. Refer to documentation.
Step 2. Under User data tab, select Events, and create an event using + New event. You can name an event that is self-descriptive. You can create as many events as you need.
Step 3. This step requires adding a specific line of code to embed the event tag in the source code. Within any code or function that needs to be tracked, add the following line:
eventName should match the new event that you created in step 2. Make sure the event name, letter case, and any special characters all specifically match.
Step 4. Create a survey and get it ready to publish. Before publishing, you can specify the event trigger.
Step 5. Select Event and select the dropdown menu.
Step 6. You’ll be able to see the event that you created. Select the event that you created.
Step 7. Configure the rest of the setup and publish the study. Once you publish the survey, you can still edit the event tag, which gives you flexibility to edit live studies. Make sure to test the survey before sharing it with testers.
To learn more, see related articles: