Launching Surveys After Specific User Tasks

Learn how to trigger surveys based on user actions using JavaScript.

Luca Micheli
Written by Luca MicheliLast update 10 days ago

To launch a survey after a user has completed a specific task, you can utilize the customerly.event function to track custom events and trigger the survey accordingly.

You can implement a slight delay to allow the system to process the event:

  1. Trigger the event:

  2. customerly.event('event_name_to_trigger_survey');

  3. Wait for a few seconds before updating:

  4. setTimeout(function() { customerly.update({}); }, 5000);

This method ensures that the survey is sent shortly after the user completes the task, allowing time for the audience to be recalculated.

For detailed documentation on creating and delivering surveys, refer to the following links:

Did this answer your question?