Modification to add opt-in support for collecting user metrics.