Displaying a survey

When you wish to collect feedback from a user, use the ProdMetrics JavaScript SDK to show a survey.

Replace YOUR-SURVEY-ID with the ID of the survey you’d like to show. To find the survey ID, sign in to your ProdMetrics account and navigate to Surveys > the survey you wish to show > Install.

prodmetrics('survey', 'YOUR-SURVEY-ID');

Display options

You can safely call the survey method multiple times, for example on every visit to a particular page. ProdMetrics will use the survey’s display options that you configured in your ProdMetrics dashboard to show the survey only when it is relevant.