Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions content/en/docs/appstore/modules/app-insights.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,22 @@ To import this module into your app, follow the instructions in [How to Use Mark
2. (Optional) Configure the constant **TEST_MODE**. If this is turned on, the survey will always show.
3. Save the changes.

4. Open the **Put Survey Widget On Template** folder, and place **Template_SurveyWidget** on the page where you would like the mini-survey to appear.
5. Open the **Show Survey** folder, and copy the **ShowSurvey_OnAction** nanoflow to your own module.
6. Set up the **ShowSurvey_OnAction** nanoflow as follows:
4. Open the **Put Survey Widget On Template** folder, and place **Template_SurveyWidget** on the page where you would like the mini-survey to appear. We recommend placing only one widget inside the master layout page.
5. Configure how the mini-survey will appear, either on-action or on-page load:

1. Double-click **Create String variable**, fill in the survey ID of the mini-survey, and then save the changes. You can find the survey ID on the [Settings](/developerportal/collaborate/product-insights/#survey-details-settings) tab or [Implementation](/developerportal/collaborate/product-insights/#survey-details-implementation) tab of the survey details page in **App Insights** in the Developer Portal.
2. Double-click **CHANGE ME**, add your microflow or nanoflow action here, then save the changes.
* For the on-action option:

1. Open the **Show Survey** folder, then copy the **ShowSurvey_OnAction** nanoflow to your own module.
1. In the nanoflow, double-click **Create String variable**, fill in the **Survey ID** of the mini-survey, and then save the changes. You can find the survey ID on the [Settings](/developerportal/collaborate/product-insights/#survey-details-settings) tab or [Implementation](/developerportal/collaborate/product-insights/#survey-details-implementation) tab of the survey details page in **App Insights** in the Developer Portal.
1. (Optional) Double-click **CHANGE ME**, add your microflow or nanoflow action, then save the changes.
1. Create a button that calls the **ShowSurvey_OnAction** nanoflow on the page where **Template_SurveyWidget** is placed. Mendix recommends renaming the flow to something that describes the original action.

7. Create a button that calls the **ShowSurvey_OnAction** nanoflow on the page where **Template_SurveyWidget** is placed. Mendix recommends renaming the flow to something that describes the original action.
8. In **App Explorer**, double-click **Security**, and add the **AppInsights_MiniSurvey.User** user role to all the system roles that use the mini-survey in the **App Security** dialog box.
* For the on-page load option:

1. Open the **Show Survey** folder, and copy the widget from **ShowSurvey_OnPageLoad** to your page.
1. Place this widget on any page you wish to show the survey (you can use multiple **Show Mini Survey On Page Load** widgets in your app to trigger many surveys).
1. Double-click the **Show Mini Survey On Page Load** widget, then fill in the **Survey ID**.

6. In **App Explorer**, double-click **Security**, and add the **AppInsights_MiniSurvey.User** user role to all the system roles that use the mini-survey in the **App Security** dialog box.

{{% alert color="info" %}}Once the start time of the mini-survey is reached, the mini-survey will start running, and all the target users of the mini-survey will receive the survey automatically.{{% /alert %}}