analytics working example