2 Comments »
Leave a Comment
You must be logged in to post a comment.
/* Plugin Name: Google Analytics Plugin URI: http://blog.thedt.net/2005/11/14/google-analytics-plugin/ Description: allows the user to add their Google Analytics code to each blog page automaticly. Version: 0.1 Author: Matt Labrum Author URI: http://blog.thedt.net */ add_action('admin_menu','ga_menu'); add_action('admin_head','ga_addcode'); add_action('wp_head','ga_addcode'); function ga_addcode(){ $code = get_option('ga_code'); if(!empty($code))echo stripslashes($code); } function ga_menu(){ add_options_page('Google Analytics', 'Google Analytics', 9, __FILE__, 'ga_manage'); } function ga_manage(){ if(isset($_POST['ga_code'])){ update_option('ga_code', $_POST['ga_code']); echo '
Options saved.
Craig’s musings
You must be logged in to post a comment.
flickr.com/photos/jm said,
June 5, 2009 at 12:24 pm
People use Windows? don’t you mean they use web browsers running on Windows? ;)
Craig said,
June 5, 2009 at 1:20 pm
Web browsers, and it seems, they read email in an email application as well.