Forums

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

  1. mastertechmag
    Member
    Posted 2 years 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 2 years 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 2 years ago #

    THANKS! just found it!

  4. KCC
    Member
    Posted 2 years 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 2 years 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/

  6. easywolf32
    Member
    Posted 2 years ago #

    KCC..

    You click on Appearance, click on Editor, than on the right you'll see footer.

  7. riskczar
    Member
    Posted 2 years ago #

    Folks,

    I have the same question as mastertechmag who began this thread, but unlike him, nothing suggested above makes the slightest sense to me. I don`t see what you are seeing.

    How lame is that.

  8. greenbread22
    Member
    Posted 2 years ago #

    riskczar, just for you i posted a screen shot,

  9. greenbread22
    Member
    Posted 2 years ago #

    ya my link isnt showing up so ...non clickable..

    http://www.100kgrowth.com/google_anol.jpg

Topic Closed

This topic has been closed to new replies.

About this Topic