Archived topic
Problems with Analytics Code and GP Elements
5 replies · Started by Rocio on January 15, 2019
Hi there GP team:
I have a problem with the Google Analytics code. I installed it with GP Elements as header. It seems to be working, as the Google Analytics page shows me visits and stuff.
But when I try to match it with Search Console, it tells me it's installed incorrectly.
I did this same procedure with many websites using GP and I never had a problem.
Do you have any ideas on what I'm doing wrong?
Best regards,
Rocio
Hi there,
how did you add the GA script? It should go in Elements > Hook > wp_head hook.
Let me know :)
I did it as you mention.
I'll mention this because I think it is what is causing trouble.
The website is in two languages, and I translated it with a plugin called Polylang. So when I'm adding the element, there is this language widget at the rigth. So basically I don't know if that is overwriting something... My technical knowleadge is limited so I can't really tell.
I'd really apretiate the help
Rocio
Hi there,
I think David meant to say add it as a Hook: https://docs.generatepress.com/article/hooks-element-overview/
It looks like you added it as a Header (as David mentioned).
Adding it as a Hook and setting it to wp_head should fix any issues :)
Oh I'm so sorry I didn't understand what you meant.
I finally solved it, thanks a lot man!
Sorry my bad my instructions were completely wrong. Glad to hear you got it resolved.