First code to log interaction