A wordpress plugin
I wrote a Wordpress plug-in for the Google Analytics script (if you can call 6 lines of PHP a 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 ‘
‘;
}
add_action(’wp_head’, ‘call_google_script’);
?>


