- This topic has 12 replies, 2 voices, and was last updated 3 years, 2 months ago by
Leo.
-
AuthorPosts
-
January 5, 2023 at 10:49 am #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.
January 5, 2023 at 11:14 am #2485021Leo
StaffCustomer SupportHi 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 🙂
January 5, 2023 at 1:11 pm #2485115Sharon 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?
January 5, 2023 at 1:30 pm #2485123Leo
StaffCustomer SupportDoes Google Search Console provide any instructions on where to place the code?
Can you link me to the page in question?
January 5, 2023 at 1:46 pm #2485137Sharon 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…
January 5, 2023 at 1:58 pm #2485144Leo
StaffCustomer SupportThen the
wp_headhook 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.
January 5, 2023 at 2:17 pm #2485162Sharon 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!
January 5, 2023 at 2:20 pm #2485167Leo
StaffCustomer SupportJust to confirm that your element looks like this?
https://www.screencast.com/t/iFJYTbaoLK5WIf so it should definitely work – make sure any server or hosting cache is cleared. It’s unrelated to your browser cache.
January 5, 2023 at 2:34 pm #2485186Sharon 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.
January 5, 2023 at 2:36 pm #2485187Leo
StaffCustomer SupportCan you link me to the site in question?
January 5, 2023 at 2:55 pm #2485199Sharon 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!
January 5, 2023 at 2:56 pm #2485200Sharon Brodin
Resolved.
January 5, 2023 at 3:11 pm #2485208Leo
StaffCustomer SupportGlad to hear.
-
AuthorPosts
- You must be logged in to reply to this topic.