Forums

[resolved] Google Analytics - Finding <body> tag (5 posts)

  1. mastertechmag
    Member
    Posted 1 month ago #

    I have this code for Google Analytics tracking:

    <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
    try{
    var pageTracker = _gat._getTracker("UA-xxxxxx-x");
    pageTracker._trackPageview();
    } catch(err) {}
    </script>

    -instructions (https://www.google.com/support/googleanalytics/bin/answer.py?answer=55488&hl=en_US&utm_id=ad) say to place the above code directly before the </body> tag.

    one problem...where is the <body> & </body> tags in WP?????

    Any advice?
    Thanks!

  2. iridiax
    Member
    Posted 1 month ago #

    Check your theme's footer.php. If it's not there, then look in the other theme files.

    http://codex.wordpress.org/Editing_Files

  3. mastertechmag
    Member
    Posted 1 month ago #

    THANKS! just found it!

  4. KCC
    Member
    Posted 1 week ago #

    I'm real new and need to find the location of <body> tag too ... where is the footer.php - I've looked all around. Thanks!

  5. songdogtech
    Member
    Posted 1 week ago #

    <body> is going to be in header.php, </body> is going to be in footer.php, both files are in your theme directory: wp-content/themes/

Reply

You must log in to post.

About this Topic