sample analytics code