Added custom analytics code