Pushing Category and Publish Date to Google Analytics
If you’re printing your script inline (i.e. not in an external file), you can use PHP to dynamically output the JavaScript argument: <script> _gaq.push( ‘setCustomVar’, 3, ‘pubDate’, ‘<?php the_time( ‘Ym’ ) ?>’, 3 ); </script> See the PHP manual for date arguments, which will explain why I’ve used Ym.