Move GA code up to catch errors
Autoindent
Send search events to GA.  Leo: Is this OK in the main thread here? GA is async.