Skip to content

Instantly share code, notes, and snippets.

Adding a Google Analytics Link to the Wordpress Dashboard
<?php
function dwwp_add_google_link() {
global $wp_admin_bar;
$wp_admin_bar->add_menu( array(
'id' => 'google_analytics',
'title' => 'Google Analytics',
'href' => 'http://google.com/analytics/'
) );
}
add_action( 'wp_before_admin_bar_render', 'dwwp_add_google_link' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment