add ga code
change insert query to Exec

This was causing too many open file descriptors in production after
running for a while because of streams not read fully.