WordPress.org

Ready to get started?Download WordPress

Forums

Hero
Google Analytics Code (3 posts)

  1. Rachel Royle
    Member
    Posted 9 months ago #

    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?

  2. SellPropertyFastCash
    Member
    Posted 9 months ago #

    You need to add this to your root folder. I would also suggest you set up Webmaster Tools as well. Will save you the trouble in verifying this later. We have done this for our project on sellpropertyfastcash.co.uk

  3. Rachel Royle
    Member
    Posted 9 months ago #

    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-->

Reply

You must log in to post.

About this Theme

About this Topic