WordPress.org

Forums

Google Analytics
[resolved] GA Script Not added to page (2 posts)

  1. FirstRulez
    Member
    Posted 1 year ago #

    I have inherited an old site which uses a very heavily customised WordPress template. Unfortunately for some reason when adding your plugin the GA code is not being added to all of the pages within the site as expected and I suspect this is due to the customisation of the WP templates removing a reference which is required to make this work.

    Can you advise which template file references need to be in place to allow your plugin to work?

    Thank you

    http://wordpress.org/plugins/googleanalytics/

  2. FirstRulez
    Member
    Posted 1 year ago #

    In case anyone has this problem again I managed to track the issue down.

    The templates within our site had been edited and did not use:
    <?php get_header(); ?>
    <?php get_footer(); ?>

    Which resulted in the header.php and footer.php in the template not being used.

    Within header.php there is a call to:
    <?php wp_head(); ?>

    This is where the Google Analytics code (and many other plugins) insert code into pages.

    If I find the people who removed that from our templates... Cowboys!

    David

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google Analytics
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.