In the dialog manager you can use the "user-statistic block" to create a custom measure point somewhere in your dialogs design. Drag and drop an action block onto the flow to place it.
Select the user-statistics block and define a variable name in the right menu.
Go to the bot settings and the custom widget tab. Here you can create formula's, based on the variables to create custom metrics in your widgets.
Access your saved variables in the inputfield by typing [
.
(if a variable doesn't show yet, make sure you've saved your flow)