- This topic has 41 replies, 5 voices, and was last updated 4 years, 9 months ago by
Anton.
-
AuthorPosts
-
May 30, 2021 at 10:13 am #1803679
Heath
I have the GP Premium and currently put the code in a hook in the wp_head with the entire site checked. I’m not sure this is where I need to put it as numbers over the last several days don’t seem accurate. Is that correct?
May 30, 2021 at 11:15 am #1803731Leo
StaffCustomer SupportHi there,
Yup that is the correct spot:
https://generatepress.com/forums/topic/how-to-add-google-analytics-code-to-generate-press/#post-771208May 30, 2021 at 2:19 pm #1803843Heath
Hmm. My analytics is not working.
May 30, 2021 at 7:24 pm #1803950Elvin
StaffCustomer SupportHi Heath,
Can you share the script you’re trying to add? (use the private information text field)
I’ve checked the site and I don’t see the usual google analytics script on the
<head>of your site.Note: Google takes time to reflect the data. Even when the script is properly loaded, it takes time to display things right. 🙂
May 30, 2021 at 7:34 pm #1803960Heath
This is I guess Google Analytics 4 code. This is the exact code that analytics says to add in the header.
May 30, 2021 at 8:46 pm #1804001Elvin
StaffCustomer SupportThanks.
I’ve rechecked again and found it as shown here – https://share.getcloudapp.com/v1uYvg5Z
I’m not sure if this is the right script, but if it is, then we should give Google a few hours to get things going as this isn’t something instant. It will take Google Analytics sometime before showing your stats.
Tip: If you find this lacking, consider using a plugin. Check this – https://www.wpbeginner.com/beginners-guide/how-to-install-google-analytics-in-wordpress/ (MonsterInsight)
May 30, 2021 at 9:00 pm #1804008Heath
Yeah I seems to be at least partially working at the moment. Thanks for checking.
May 30, 2021 at 9:39 pm #1804037Elvin
StaffCustomer SupportNo problem. Glad to be of any help. 😀
June 1, 2021 at 8:06 pm #1806690Heath
Just to let you know, the numbers seemed off again. Out of curiosity, I switched back to my old theme and the analytics are flowing like a charm so I’m not sure what it is about GP that I’m not able to get my analytics in there right.
June 2, 2021 at 3:25 am #1807028David
StaffCustomer SupportHi there,
looks like you’re running Google Tag Manager – which requires two codes, the first code provided gets hooked into the
wp_head– the second code they provide should be hooked into thewp_body_openAlso ensure and Plugin and server side caches are cleared after making these changes, this will ensure the updated page gets served up for the analytics scripts to fire.
June 2, 2021 at 4:58 am #1807091Heath
Yeah. I was doing that. Unless I had something off but I triple checked.
June 2, 2021 at 6:25 am #1807172David
StaffCustomer SupportLooks like you have another theme installed on the site.
I ran a gachecker test on the site and the vast majority of the URLs failed to display a valid GA or GTM Tag.
Then i took a closer look at some of the failed URLs eg.https://theprospecttimes.com/tag/joey-gallo/
And this has 2 x instances of gtag/js installed into
<head>which is why that one failed.So i can only assume you have another plugin or function that is adding GA scripts … considering this is not even on the GP theme.
June 2, 2021 at 7:14 am #1807242Heath
I just ran that as well and have no clue what would cause that. I dont have any plugins adding any GA code.
June 2, 2021 at 7:29 am #1807255David
StaffCustomer SupportAny custom functions in say the Code Snippets plugin ?
June 2, 2021 at 7:32 am #1807260Heath
I would say yes but that plug-in isn’t active. I’m not even sure I have that even as an inactive plug-in. This is bothering me because I really want to have GP as my theme. Now I’m not even sure if the numbers I am seeing are accurate.
-
AuthorPosts
- You must be logged in to reply to this topic.