customized analytics code