Check if event (click/submit) is user generated or from a script