Support » Themes and Templates » word press and google analytics

  • Resolved gavinandbeth



    I am really new to this. I’ve created a website and would like to add Google Analytics. I need to enter my GA code onto my WP site and I think I understand that I need a functions.php file. Its supposed to be located in my theme directory, but I have no clue where to find the theme directory.

    Please help!


Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi there,

    If you get your Google Analytics code you can insert it in your header file…


    I would advise adding it just above the closing <head> tag, so find this:


    And replace it with this:

    Your Analytics Code Here (as provided by Google)

    This should do it for you 🙂

    Theme directory is inside WP-Content/themes/your_theme_name/

    Thanks for your replies, but I don’t know where to find either one:


    Will this be located in a folder on my computer, on the word press site, or in my website page?

    Thanks again!

    Hi, you can edit the file via the control panel -> Appearance -> Edit.
    Then choose the page top / header.php on the right side.

    Remember to make a local backup of the contents before you edit 🙂 Save it in notepad on your local pc before editing.

    Thank you! Thank you! Thank you!

    You find it inside your hosting space. When you buy a hosting, they give you access to control panel (usually cPanel). After you login, use the file manager and browse to public_html folder. You will find wp-content inside this folder if you install WordPress in the root directory.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘word press and google analytics’ is closed to new replies.