Wordpress plugin for Google Analytics
I wrote a Wordpress plug-in for the Google Analytics script. After I wrote it, I found that someone else had written a better one a few hours earlier.
Anyway, here’s mine. Cut and paste it into a file in your plugins directory with some name that ends in .php. Sign up for an account with Google, and paste your account string where indicated below. Then go to the plugins admin page and click “activate.”
/*
Plugin Name: Google Analytics
Plugin URI: http://pingswept.org/index.php/wp_plugins
Description: Adds Javascript instrumentation to main page for Google Analytics
Version: 0.1
Author: Brandon Stafford
Author URI: http://pingswept.org
*/
function call_google_script() {
echo ‘
type=”text/javascript”>
_uacct = “PUT YOUR ACCOUNT STRING HERE”;
urchinTracker();
‘;
}
add_action(’wp_head’, ‘call_google_script’);
?>
December 12th, 2006 at 12:51 pm
What I want to do on my blog, is every few hours take the oldest post and move it to the
front of the queue, all automatically. Anyone know if there is a plugin that can do this or
a simple way to set up another plugin to do this (use my own feed perhaps)?
Thanks.