Title: Google Analytics Code
Last modified: August 21, 2016

---

# Google Analytics Code

 *  [Rachel Royle](https://wordpress.org/support/users/rachel-royle/)
 * (@rachel-royle)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/google-analytics-code-5/)
 * Im trying to get my website on google listing as at the moment its appearing 
   no where.
 * When i put in the google analytics tracking code into the theme options where
   it says “google analystics” its not working… the analytics keeps saying:
 * > Status: Tracking Not Installed
   >  Last checked: 29-Oct-2013 04:40:17 PDT The 
   > Google Analytics tracking code has not been detected on your website’s home
   > page. For Analytics to function, you or your web administrator must add the
   > code to each page of your website.
 * This is my code:
 *     ```
       <script>
         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
         m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
         })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
   
         ga('create', 'UA-45243983-1', 'candyheartsmakeupandhair.co.uk');
         ga('send', 'pageview');
   
       </script>
       ```
   
 * Any ideas?

Viewing 1 replies (of 1 total)

 *  Thread Starter [Rachel Royle](https://wordpress.org/support/users/rachel-royle/)
 * (@rachel-royle)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/google-analytics-code-5/#post-4267858)
 * I did put it in header.php in the <head></head> tags too which allowed me to 
   set up the webmaster tool as it recognized the code but the tracking status still
   says not installed. I don’t know what to do.
 *     ```
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
   
       	<head profile="http://gmpg.org/xfn/11">
       		<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
       		<title><?php 	
   
       		wp_title( '|' );
   
       	// Add the blog description for the home/front page.
       	$site_description = get_bloginfo( 'description', 'display' );
       	if ( $site_description && ( is_home() || is_front_page() ) )
       		echo " | $site_description"; ?>
   
       		</title>
   
       <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
   
       <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
   
       <?php wp_head(); ?>
   
       <script>
         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
         m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
         })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
   
         ga('create', 'UA-45243983-1', 'candyheartsmakeupandhair.co.uk');
         ga('send', 'pageview');
   
       </script>
   
       </head>
   
       <body <?php body_class(); ?>>
   
       	<!--wrapper-->
       	<div id="wrapper">
   
       	<!--headercontainer-->
       	<div id="header_container">
   
       		<!--header-->
       		<div id="header2">
   
       				<?php if ( ( of_get_option('logo_image') ) != '' ) { ?>
       		<div id="logo"><a href="<?php echo home_url(); ?>" title="<?php bloginfo('description'); ?>"><img src="<?php echo of_get_option('logo_image'); ?>" alt="<?php echo of_get_option('footer_cr'); ?>" /></a></div><!--logo end-->
       	<?php } else { ?>
       			<div id="logo2"><a href="<?php echo home_url(); ?>" title="<?php bloginfo('description'); ?>"><?php bloginfo( 'name' ); ?></a></div><!--logo end-->
       	<?php } ?>
   
       			<!--menu-->
   
       		<div id="menubar">
   
       	<?php $navcheck = wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary', 'menu_class' => 'nav' ,'fallback_cb' => '', 'echo' => false ) ); ?>
   
       	 <?php  if ($navcheck == '') { ?>
   
       	<ul class="nav">
       		<li class="page_item"><a href="<?php echo home_url(); ?>" title="Home">Home</a></li>
       		<?php wp_list_pages('title_li=&sort_column=menu_order'); ?>
   
       	</ul>
       <?php } else echo($navcheck); ?> 
   
       	</div>
   
       	<!--menu end-->
   
       			<div class="clear"></div>
   
       		</div><!-- header end-->
       		<hr />
   
       	</div><!--header container end-->
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Google Analytics Code’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/hero/1.6.2/screenshot.png)
 * Hero
 * [Support Threads](https://wordpress.org/support/theme/hero/)
 * [Active Topics](https://wordpress.org/support/theme/hero/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/hero/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/hero/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [Rachel Royle](https://wordpress.org/support/users/rachel-royle/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/google-analytics-code-5/#post-4267858)
 * Status: not resolved