added optional analytics usage