Add console-catching javascript preamble to production tags