If you are using Universal Analytics, here's code from Alan...