WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Google Analytics for WordPress] wp_footer not called (22 posts)

  1. fergusfish
    Member
    Posted 5 years ago #

    I have installed the plug in for google analytics from http://yoast.com/wordpress/google-analytics/ and added code correctly my uA tracking ID
    The help page states in faqs
    I'm logged out and I still don't see the tag code on my posts or pages?
    Check whether your theme calls wp_footer(); in footer.php, if it doesn't, add it

    Have looked at footer.php and wp_footer is not called
    Cam sks please give me the exact line of code I should add to footer.php

    Mnay thanks in advance

  2. iridiax
    Member
    Posted 5 years ago #

    Add this before the </body> tag (and any analytics code) in your footer.php:

    <?php wp_footer(); ?>

  3. fergusfish
    Member
    Posted 5 years ago #

    thanks iridiax
    that seems to have resolved it

  4. jackiecooperwriter
    Member
    Posted 5 years ago #

    Hello
    please can you help me? I have gone through all this and still don't see any google analytics code anywhere.
    I have gone into the theme editor and put <?php wp_footer(); ?> ahead of whatever code is in this file. There is no <body> tag in the code in this file.
    I tested the page and still saw the footer appear as it had before.
    Then I pasted in the google analytics code between the <?php wp_footer(); ? and the rest of the code in this file. The footer still looked the same and I don't see any google analytics code anywhere.
    I am stuck - what do I do? I don't know html and I'm not sure where to go from here.

  5. jonathanstegall
    Member
    Posted 5 years ago #

    You need to make sure that the file you are editing is called "footer.php". If the file does not have </body>, do not add the wp_footer code. A WordPress theme is made up of many files, some that contain HTML and some that do not.

    A good footer.php will end like this:

    <?php wp_footer(); ?>
    </body>
    </html>

    This should work nicely for you, if you modify the correct file.

  6. jackiecooperwriter
    Member
    Posted 5 years ago #

    Thanks Johathan

  7. uCode
    Member
    Posted 5 years ago #

    Still not working for me. I have a correct footer.php but I don't see the code anywhere. I'm using a static front page (page_home.php) that displays the WP-Cumulus plugin by Roy Tanck which displays a tag-cloud.

  8. uCode
    Member
    Posted 5 years ago #

    Just updated to v2.8. Seems to work now!

  9. PoleSkivvies
    Member
    Posted 5 years ago #

    Hi -

    I just installed this plug in and my footer code looks correct, but I don't see anything, even when I log out as admin. Frankly, I'm really new at this and am not sure what I'm supposed to be seeing. But the footer looks exactly the same.

    Any suggestions?

    Thank you,
    Jennifer

  10. pdt256
    Member
    Posted 5 years ago #

    Please update to reflect these options for wp_footer...

    http://codex.wordpress.org/Theme_Development

    wp_footer
    Goes in the "footer" of a theme; footer.php template. Example plugin use: insert PHP code that needs to run after everything else, at the bottom of the footer.

    Usage: <?php do_action('wp_footer'); ?>
    -or- <?php wp_footer(); ?>

  11. AlexinMilan
    Member
    Posted 5 years ago #

    Just upgraded this plugin and am getting:

    Warning wp_footer(); not found in your footer.php file, this might mean this plugin will not work!

    I have <?php do_action('wp_footer'); ?> in my footer.php file just before the <body> tag.

    What is the problem? Do I need to change <?php do_action('wp_footer'); ?> to <?php wp_footer(); ?> or will this break the theme??

    Please let me know - this plugin has been working great up to now.

    Thanks

  12. jmga
    Member
    Posted 5 years ago #

    I've been using the last version for a month now without any problem. I updated to the new version tonight like everybody else here. Now I also receive the same warning sign.

    Could it be that my footer.php is called Footer.php with a capital letter. If not there is a bug with the new version.

    Thanks for your time

    Jean-Marc

  13. zhihong
    Member
    Posted 5 years ago #

    I met the same problem as you did. I am using the theme "inove" for my blog, and I found that footer.php of this theme has 1 line as below:

    <?php include('templates/end.php'); ?>

    I open the end.php and found it do has the codes like this:

    <?php wp_footer(); ?>
    </body>
    </html>

    So I just copy the content of end.php to replace the line"<?php include('templates/end.php'); ?>" in footer.php, and the problem is solved.

  14. Pali Madra
    Member
    Posted 5 years ago #

    Thanks iridiax.

    The trick worked for me and I'm using
    WordPress 2.8
    Yoast 2.9.3

    Pali Madra

  15. joerow
    Member
    Posted 5 years ago #

    I am relatively new to WordPress and am also having the same problem with this plugin. I use WordPress 2.8 and have deleted and reinstalled the plugin. I have made sure that the necessary code in in the footer.php including my code in the brackets and that it is in the correct place in footer.php but I am still getting the same message on the plugin page that 'Warning wp_footer(); not found in your footer.php file, this might mean this plugin will not work!'
    I am using the Grow your Business Theme and am at a complete loss to know what else to do.

  16. ycesur
    Member
    Posted 5 years ago #

    Hi everyone,

    Here is the content of my "footer.php" file's content:

    <div class="footer">
    <div class="fr">Designed by 110Words InfoZoft</div>
    <div class="fl">Copyright © 2008 · "><?php bloginfo('name'); ?></div>
    </div>

    Where should I put the above lines please?

    Thanks and Regards,

    Yilmaz Cesur.

  17. ycesur
    Member
    Posted 5 years ago #

    Hi again,

    I am also relatively new to Word Press and my theme is flexi-blue.

    I will appreciate any help.

    Kind Regards,

    Yilmaz Cesur,
    Melbourne - Australia.

  18. ycesur
    Member
    Posted 5 years ago #

    I put lines suggested by jonathanstegall in between the last two </div> and it seems to be fixed now.

    Thanks everyone.

    Yilmaz Cesur.

  19. traynor
    Member
    Posted 5 years ago #

    Ok - if we can put <?php wp_footer(); ?> into footer.php can't we just put our analytics code right there and it shows up?

    If so, what's the point of this plugin - especially if you still have to edit footer.php?

    I just edited footer.php and put my analytics code in there right before the </body> tag and the analytics load on every page.

    Am I missing something? Why is there a plugin for this??

  20. timacosx@gmail.com
    Member
    Posted 4 years ago #

    I made the change as zhihong did since I am using the same theme (inove). It worked for me also. GA is now tracking.

    I have to say, I'm in agreement with traynor, if you insert the GA code into the footer.php file making it work, then why would you need the plugin? I believe I'm going to try it and see if it works for me.

  21. digitalartempire
    Member
    Posted 4 years ago #

    what is the google analytics code suppose to lookk like on the footer php? is it the same as the tracking code from google ?

    please advice which code to put where thanks: ) :)

  22. marketlikeachick
    Member
    Posted 4 years ago #

    I have looked at my footer.php file and it has the correct codes. But, my footer is not displaying at all and Google analytics is not tracking.

    I use the NeoClassical 2 column theme. The footer.php file contains:

    <!-- APPRECIATIONS IF YOU LEAVE ALL LINKS INTACT. THANKS! --><div id="footer"> <p>Copyright © <script type="text/javascript" language="JavaScript"><!--var today = new Date();document.write(today.getFullYear());//--></script> /"> ~ <?php bloginfo('url');?>
    2 Column Neoclassical Theme <?php wp_footer(); ?></div></div></div><!--[if lte IE 7]><div id="ie_clear"></div><![endif]--></body></html>

    When I load my page & look at source code I can see the GA codes there. Not sure why it's not working.

    Can anyone help?

Topic Closed

This topic has been closed to new replies.

About this Topic