WordPress.org

Ready to get started?Download WordPress

Forums

Where do I insert Google Analytics code? (14 posts)

  1. daerr.us
    Member
    Posted 2 years ago #

    Hello, I want to track my blog with Google Analytics and need to insert some code into the home page. Where or what exactly is my home page?

    Many thanks,
    Torsten

  2. klevismiho
    Member
    Posted 2 years ago #

    It's better to insert it before the closing </body> tag.
    This is better for SEO.

  3. daerr.us
    Member
    Posted 2 years ago #

    But what page do I insert the code in? What is my home page?

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    Try looking in your theme's footer.php file.

  5. daerr.us
    Member
    Posted 2 years ago #

    This is what my theme's page looks like:

    [2491 lines of CSS moderated as per the Forum Rules. Please just post a link to your site.]

  6. esmi
    Forum Moderator
    Posted 2 years ago #

    Try looking in your theme's footer.php file.

  7. daerr.us
    Member
    Posted 2 years ago #

    Where do I find that?

  8. esmi
    Forum Moderator
    Posted 2 years ago #

    Appearance -> Editor. Select your theme. Look for footer.php.

  9. daerr.us
    Member
    Posted 2 years ago #

    I searched for the string 'footer.php. but there were no results.

  10. Like esmi says, just locate your footer.php file, and paste it in there... it will load on every page of your site.

    I also use the plugin Google Analytics for WordPress, which may be easier.

  11. klevismiho
    Member
    Posted 2 years ago #

    Look to your theme folder, it there is no footer.php look at index.php.
    You can also put the google analytics code after dhe opening <body>, which usually is at header.php

  12. daerr.us
    Member
    Posted 2 years ago #

    I've tried to upload the plugin and got this: Could not create directory. /wp-content/upgrade

    How can I solve this?

    Thanks,
    Torsten

  13. esmi
    Forum Moderator
    Posted 2 years ago #

    Perhaps you should consider hiring someone to carry out this work for you.

  14. daerr.us
    Member
    Posted 2 years ago #

    Have already done so ;-).
    Thanks for the suggestion.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.