Probably the easiest way is to make the Player an Alias in a Quest
Then, add a script to the Alias and add the OnCast Event to that script. http://www.creationkit.com/OnSpellCast_-_ObjectReference
Note that you would need to translate the Alias to an ObjectReference using http://www.creationkit.com/GetReference_-_ReferenceAlias as the first thing in your Event script.
While the you made Quest is Active (started and not stopped) the routine will run on the Player (if you stop the quest, the routine will not run)
Note that the Quest would not have to do anything else: Just hold an Unique Alias that points to the Player and that Alias to have the single script and the single event trap.