-1

I recently created a site using wordpress here http://www.volatileinterface.com/. I created a google analytics account and then added the tracking code to all of my pages using a plugin from the wordpress list of plugin. On going back to the google analytics page I get a message like this.

Status: Tracking Not Installed Last checked: Jul 17, 2015 5:06:20 PM 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.

I went to my website and looked at the html code and clearly saw that the google analytic code was on each of the webpages, so I don't understand what the problem is. How would I make google register it as installed?

EDIT: I have now disabled the plugin and instead put the script directly in the footer using the "Insert Headers and Footers" plugin. I am still getting the same problem. I followed all the steps of this video https://www.youtube.com/watch?v=H-q4PBZELDk.

1

After reading more about the google analytic site, I found that it can take a while for analytics to start working. After waiting a full night, analytics is now working perfectly.

0

It's better that you should contact the plugin author for the problem you are facing. There is another approach you can follow. Go to the theme directory and in your functions.php file , Paste this little code.

function custom_analytics_code(){

    $analytics_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-XXXXXXXX', 'auto');
      ga('send', 'pageview');

    </script>";
    echo $analytics_code;
}
add_filter('wp_footer','custom_analytics_code' );

Add this function in your file i.e. Functions.php file and Replace the $analytic_code variable with your tracking code and save the file and you are done. Now you can use inspect element and search for the code that you have entered so that you can be sure that the code is actually output in the Footer.

Note: You mush have wp_footer();function added to your footer.php file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.