Site logo

[Resolved] Where to place Google Search Console HTML file?

Home Forums Support [Resolved] Where to place Google Search Console HTML file?

Home Forums Support Where to place Google Search Console HTML file?

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #2484995
    Sharon Brodin

    I’ve done this with my other websites, but they use GP Hooks. For my newest WordPress site there isn’t GP Hooks, but Elements. I can’t figure out where to place the HTML file so it doesn’t display and so Google verifies it.

    #2485021
    Leo
    Staff
    Customer Support

    Hi Sharon,

    A hook element is essentially the same as the previous GP Hooks:
    https://docs.generatepress.com/article/hooks-element-overview/

    Let me know if this helps 🙂

    #2485115
    Sharon Brodin

    Thank you, Leo. I created a Hook for Google Analytics [wp_head] with display Location on Front Page. But when I do the same for Google Search Console, I can see the code on my header (I can’t see the code for Google Analytics). What am I doing wrong?

    #2485123
    Leo
    Staff
    Customer Support

    Does Google Search Console provide any instructions on where to place the code?

    Can you link me to the page in question?

    #2485137
    Sharon Brodin

    I guess my Google Analytics code isn’t working either, now that I went back and checked. Here’s where Google says to place the Analytics code:

    “The Google Analytics tag should be added near the top of the <head> tag and before any other script or CSS tags”

    If I can get that working, it looks like I can verify my site with Google that way and I won’t need a separate Search Console code…

    #2485144
    Leo
    Staff
    Customer Support

    Then the wp_head hook is correct.

    Any caching plugins? Make sure it’s cleared after making the change.

    The theme has no ability to make the code not work.

    #2485162
    Sharon Brodin

    I cleared the cache on my browser…do I need to also clear specifically on the website? I do not have a caching plugin.

    When I just tried to verify Google Analytics again I got this failure message: “We could not find any Google Analytics tracking codes on the index page of your site.” Any ideas?

    Thank you!

    #2485167
    Leo
    Staff
    Customer Support

    Just to confirm that your element looks like this?
    https://www.screencast.com/t/iFJYTbaoLK5W

    If so it should definitely work – make sure any server or hosting cache is cleared. It’s unrelated to your browser cache.

    #2485186
    Sharon Brodin

    Yes, the Google Analytics code is longer, but generally the same. I don’t know how to clear the server or hosting cache. Maybe I can get on with my host’s tech support for that.

    #2485187
    Leo
    Staff
    Customer Support

    Can you link me to the site in question?

    #2485199
    Sharon Brodin

    I actually figured it out! I got the W3 Total Cache plugin, just went thru the steps and got Google to verify my site ownership. It worked, so I’m in. Thank you for your help, Leo!

    #2485200
    Sharon Brodin

    Resolved.

    #2485208
    Leo
    Staff
    Customer Support

    Glad to hear.

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.