WordPress.org

Forums

[resolved] insert tracking script after <body> tag (mybloglog) (7 posts)

  1. agentsully
    Member
    Posted 8 years ago #

    I need to insert a tracking script after the <body> tag for my site, but I'm having a hard time finding it.

    Would it be in style.php?
    If so, then there is nothing that says <body>, just

    body
    {...blah blah blah...

    Is this where I should put it?

    Thank you!

  2. tamar
    Member
    Posted 8 years ago #

    It depends on what kind of theme you're using. You'd likely want it on your sidebar, but if you have a widgetized theme, you could add the tracking script in one of the "Text" boxes.

  3. Chris_K
    Member
    Posted 8 years ago #

    Look in your theme's header.php -- that's where most theme's keep the <body> tag.

    You could also put it in your theme's footer.php right before the </body> tag.

  4. vkaryl
    Member
    Posted 8 years ago #

    Well, actually, the body tag mybloglog wants you to use it after is in header.php.

    You'll see something like this:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head profile="http://gmpg.org/xfn/11">
    *bunch of meta tags and gobbledegood code crap here*

    <?php wp_head(); ?>
    </head>

    <body>

    Something like that.... and mybloglog's tracking code goes immediately after <body> and before anything else that's there like other divs or whatever.

    I set mybloglog to load in a client's sidebar on his request, btw, and it didn't work very well at all - I don't know why, but my guess is there's a reason for mybloglog to suggest strongly that you put it where they indicate....

  5. jazlai
    Member
    Posted 8 years ago #

    Hi,

    I am using Cutline Theme.
    How do I paste the code in as there is no
    save button for me to update.

    Please advise.
    Jaz

  6. agentsully
    Member
    Posted 8 years ago #

    Thanks everyone.

    Jazlai,
    It sounds like you need to make your header.php file writable by changing the properties of the file on your server to allow writing. (do this in your ftp client by right clicking on the file, then click on properties, then check off the "write" box.)

    After you do that then you should see a save button on your theme editor for the header.php file.

    I'm no expert but I think that should solve your issue.
    AS

  7. BillyWarhol
    Member
    Posted 7 years ago #

    I had the same Question AS*

    Great Minds think alike*

    ;))

    Interestingly I went thru every button on my Dashboard + could not see that Body tag*

    Now i know i'm totally Newbie here but I'm one o those peeps that likes to dive in + do it - but U are not going to think the Body of the Template or Theme is in da Header!!

    Oh Lordy!!

    Cheers Everybody + Muchas Gracias fer da Help!! Billy ;))

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags