WordPress.org

Ready to get started?Download WordPress

Forums

Adding Google analytics to Mantra theme manually (9 posts)

  1. ClassicVolks
    Member
    Posted 1 year ago #

    Hi,

    I'd like to add Google Analytics to my blog, I am currently using the Mantra theme, not sure if that matters or not. Anyway, I'd like know where to add the tracking code - can anyone help please.

    Many thanks
    Kate

  2. Andrew Bartel
    Member
    Posted 1 year ago #

  3. ClassicVolks
    Member
    Posted 1 year ago #

    Thanks Andrew, I'll check that out :)

  4. ClassicVolks
    Member
    Posted 1 year ago #

    Ah, I know how to add the tracking code to a website, my problem is I don't know where within my blog it should be added - I am using the Mantra theme but I don't know if it goes in there or somewhere else - pretty new to wordpress but I'd rather do it manually than use a plug in.

    Kate

  5. Andrew Bartel
    Member
    Posted 1 year ago #

    Sure, the <head> tags are usually in header.php or head.php. I've never used the Mantra theme but that's true in most themes.

  6. ClassicVolks
    Member
    Posted 1 year ago #

    The question is does it need to go in the theme files or in the main files of the blog? - Could just do with a bit of a pointer. :S

  7. Andrew Bartel
    Member
    Posted 1 year ago #

    Those are theme files, located in wp-content/themes/yourtheme/head.php or header.php.

  8. sanjeev1
    Member
    Posted 1 year ago #

    Hi ClassicVolks,

    I am running into the same issue. Did you find how to add Google Analytics code to your WordPress site using Mantra theme?

    San

  9. sanjeev1
    Member
    Posted 1 year ago #

    Hi,

    I found here that the Google Analytics code has to be pasted just above the </body> tag in footer.php.

    footer.php can be found by -

    • log into your WordPress site
    • hover your cursor over Appearance (in the left navigation bar). this will open a fly-out menu
    • in the fly-out menu, click on Editor. it will list all the PHP files in the right side of your screen
    • search for footer.php in the right navigation bar and click on it. this will display the code of footer.php in the middle of the screen
    • search for </body> tag and paste the Google Analyics code just above this tag

Topic Closed

This topic has been closed to new replies.

About this Topic