Custom Properties - Tracking the installed features individually (the harder way)

On this page, we will learn how to set up the tracking of the installed features, individually, using Installer Analytics. It's a bit harder to implement comparing to the previous method but will be a lot easier to filter and process the resulting data.

First, we'll need an Advanced Installer project. You can open your existing project or create a new one. You can always follow a tutorial like this one if you're new to Advanced Installer.

Second, we need to define our features. You can skip this step if you only have one feature. For this example, we'll be having three features:

  • MainFeature
  • SecondFeature
  • ThirdFeature

Custom Properties - Features in Advanced Installer
Features in Advanced Installer

To do so, we need to:

  1. Go to the 'Organization' view
  2. Press on 'New Feature' from the ribbon OR right-click anywhere in that view and press on 'New Feature'
  3. Rename the added feature and its Identifier according to your needs; for this example, we'll be using the values presented above

Third, we will define a property for each feature, one which will 'remember' the state of each feature (if it will be installed or not). To do so, we need to:

  1. Go to the Properties view
  2. Press on 'New Property' from the ribbon OR right-click on the table, then press on 'New Property'
  3. For each feature, create a new property with a relevant name and the true value
  4. For this example, we'll be using:
    • MAIN_FEATURE
    • SECOND_FEATURE
    • THIRD_FEATURE

Custom Properties - New Property in Advanced Installer
New Property in Advanced Installer
Custom Properties - Added Properties in Advanced Installer
Added Properties in Advanced Installer

Fourth, we need to add a new dialog and a couple of checkboxes to control our features' install state. To do so, we need to:

  1. Go to the 'Dialogs' view
  2. Press on 'New Dialog' from the ribbon OR right-click on any dialog and press 'New Dialog'
  3. On the new dialog, we have to add a new checkbox for every feature that our project has, in our case three
  4. We can add a checkbox by opening the 'Control' dropdown from the ribbon and selecting the 'Check Box' item
  5. On the newly added checkbox, we should:
    1. Set a proper display value, relevant for the feature it represents; in our case, 'MainFeature'
    2. Set a relevant property name, one that we will use later, like 'MAIN_FEATURE_PROP' for the first one, 'SECOND_FEATURE_PROP' for the second one, and 'THIRD_FEATURE_PROP' for the third one
  6. Repeat the steps above for every checkbox/feature that you have
Custom Properties - Configured New Dialog
Configured a new dialog Advanced Installer

Fifth, now that we have added our checkboxes, we need to add some functionality for remembering the checkboxes' state using the properties that we have defined in the third step. To do so, we need to:

  1. Click on a checkbox
  2. Go to 'Published Events' tab in the section below
  3. Press on 'New...' button
  4. Choose 'Set installer property value' from the presented list
  5. In the 'Property' field, enter the name of the coresponding property; in our case, 'MAIN_FEATURE'
  6. In the 'Argument' field, enter the value 'true'
  7. In the 'Condition' field, enter 'MAIN_FEATURE_PROP' (the name of the property associated with the checkbox)
  8. Press OK
    Custom Properties - Add First Published Event
    Add first published event
  9. Press again on 'New...' button
  10. Choose 'Set installer property value' from the presented list
  11. In the 'Property' field, enter the name of the coresponding property; in our case, 'MAIN_FEATURE'
  12. In the 'Argument' field, enter the value 'false'
  13. In the 'Condition' field, enter 'NOT MAIN_FEATURE_PROP' (the name of the property associated with the checkbox preceded by the 'NOT' argument)
  14. Press OK
    Custom Properties - Add Second Published Event
    Add second published event
  15. Repeat steps 1-12 for each checkbox, obviously changing the name of the property according to each checkbox/feature
  16. These two published events will track the state of each checkbox and store true or false in the properties defined in the third step
    Custom Properties - Added Both Published Events
    Added both published events

docsPlease note that once you have unchecked a checkbox, Advanced Installer deletes the property altogether, thus you will see an empty space if you try to retrieve its property's value. The fifth step is necessary in order to display true or false for each feature in Installer Analytics. If you don't need these 'custom' values, you can simply skip this step.

Sixth, we need to condition our features to follow the state of the checkboxes. In other words, if we have a checkbox checked, its corresponding feature will be installed. If the checkbox is unchecked, the feature will not be installed. To do so, we need to:

  1. Go to the 'Organization' view
  2. Click on each feature
  3. In the 'Feature Properties' window presented in the right side, under the 'Installation Behavior' section, add 'NOT' and the name of the corresponding checkbox's property in the 'Not installed if:' field; in our case, for the first feature, the condition will be 'NOT MAIN_FEATURE_PROP'
  4. For the other two features, the conditions will be 'NOT SECOND_FEATURE_PROP' and 'NOT THIRD_FEATURE_PROP'
    Custom Properties - Added Feature Install Condition
    Added feature install condition

Seventh, we'll need to enable the Installer Analytics tracking for that project. If you're unfamiliar with this step, you can follow this link to guide you step by step.

Eigth, and this is the most crucial part, we need to add the properties from the third step into the Installer Analytics view of your project. To do so, we need to:

  1. Navigate to the Installer Analytics view from your Advanced Installer project
    Custom Properties - Installer Analytics View
    Installer Analytics View
  2. In the 'Report Installation Data', you'll see the Custom Properties table
    Custom Properties - Table
    Custom Properties Table
  3. Press 'Add' in order to open the 'Select a Property' picker
    Custom Properties - Property Picker
    Select a Property picker
  4. Enter 'MAIN_FEATURE' and press 'OK'
    Custom Properties - MAIN_FEATURE Property
    MAIN_FEATURE property
  5. Repeat the steps above for 'SECOND_FEATURE' and 'THIRD_FEATURE'
    Custom Properties - Added Features for Tracking
    Added Features for tracking

Last, we need to save, build the project, and finally release the installer to your customers. Once these have been done, your clients will start installing your product, and Installer Analytics WebApp will show the tracking data.

Custom Properties - Features selected for installation
Features selected for installation
Custom Properties - ADDLOCAL in WebApp
ADDLOCAL property reported in the WebApp

Note: You can also test the tracking yourself before releasing it to ensure that everything was configured correctly. If you plan to do so, please use the Only Filtered IPs option, as your IP might be already placed in the exclusion list from the App Settings view in the 'IP Filter' section.