• Resolved essaund

    (@essaund)


    Hello,

    I have installed CAOS and used site checker pro to check if Google Analytics is detectable on the website. Even though it shows its detectable on the website, GA is unable to track any hits.

    What could be the issue?

    Here’s the website in question. Please don’t post the link here in WordPress forums.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter essaund

    (@essaund)

    I have managed to figure it out. The instructions under Advanced Settings are so easy to miss.

    I had configured GA4 from my analytics account. But under settings I had picked Analytics.js (because it’s recommended) but it supports lower versions of GA4.

    After fumbling for days, I managed to read the details in fine print and realized that GA4 only works with the beta version of gtag.js version 4.

    So, picked it and now analytics works fine. Though GA4 increases the Javascript size by more than double the minified version on the website.

    I can see this is Google’s problem since the raw GA4 JavaScript file is over 170KB!!! The other alternative is using Minimal Analytics but on your plugin it only supports lower versions of GA4.

    I can see there’s an update for Minimal Analytics for GA4 online. Can you look into it and update the plugin accordingly?

    • This reply was modified 2 years, 7 months ago by essaund.

    Thank you for posting this!!! I have been pulling my hair out for two days trying to get this plugin to work with Google Analytics GA4. I too followed the provided CAOS instructions and could not get it to work (using the suggested Analytics.js). As soon as I changed the “Download File” to “Gtag.js (v4 API – Beta)”, my Google Analytics immediately started working! Thank you Essaund!

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Hi!

    Notifications seem to be slipping through the cracks regularly on this forum ??

    Thanks for posting your solution @essaund.

    Also, @timetomosey, was there anything in the documentation that mislead you i.e. lead you to configure CAOS in the wrong way?

    I’m always looking to improve my software and its documentation, and it’s just me here. So please, any feedback is welcomed!

    No worries and thank you Daan van den Bergh for your quick reply. I am just learning about how to set up Google Analytics with my new WordPress site. I think in the past (years ago) I had added GA code to my old website header.php which worked and I never looked back.

    Now with my new website, I saw online that it was suggested to use a simple plugin to do this. Also, I noticed that there is a new version of Google Analytics (GA4) so I fumbled through setting up a new GA property. Having attempted to use multiple WP plugins to connect to GA – which all failed to work, I started to think I was in over my head and obviously doing something wrong. I chose your plugin from WP Johnny’s recommendation (awesome guy and resource on all things WordPress).

    As I mentioned, GA seems to be tracking now but based on various online GA testing sites used to verify if it’s connected or working, they all state my website is not connected.

    Thread Starter essaund

    (@essaund)

    @timetomosey ~ I’m glad to be of help.

    @daanvandenbergh ~ Minimal Analytics 4? Will you consider it?

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Hi @essaund, Minimal Analytics wasn’t developed by me. So it’s up to the developer of MA if there’s going to be a v4 update. Sorry.

    Thread Starter essaund

    (@essaund)

    @daanvandenbergh ~ I had suggested the link below weeks ago before you responded to others and skipped my query.

    Anyways, the original developer mentioned on GitHub that he will no longer dedicate time to develop minimal analytics further.

    But as I mentioned in my earlier comment, another developer came up with a working solution to Minimal Analytics for GA4.

    https://dariusz.wieckiewicz.org/en/minimal-google-analytics-4-snippet/

    Have you had a look at it?

    Also missed this setting. The text currently reads:

    “analytics.js is recommended in most situations. gtag.js is a wrapper for analytics.js and should only be used if you’re using other Google services. Both are hosted locally when this option is selected! gtag.js and analytics.js can only be used with the v3 API. GA v4 (beta) users should choose gtag.js (V4 API). I don’t know what to choose.”

    Instead something like:
    “analytics.js is recommended in most situations, except for GA v4 users. gtag.js is a wrapper for analytics.js and should only be used if you’re using other Google services. Both are hosted locally when this option is selected! gtag.js and analytics.js can only be used with the v3 API. GA v4 (beta) users should choose gtag.js (V4 API). I don’t know what to choose.”

    However I still haven’t gotten it working :/

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    @essaund, Sorry, I read past that link. I’ll definitely implement this soon. Thanks for notifying me!

    @supaiku, you’re right. That description deserves a rewrite. I’ll look into that.

    Thread Starter essaund

    (@essaund)

    @daanvandenbergh ~ thank you so much!

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Hi @essaund,

    This beta includes Minimal Analytics for GA4 support. It’s in beta, but I’ve tested it and it should work.

    Again, thank you for patience, the suggestions and sorry for the hold up!

    If you have any more suggestions. Please let me know!

    Thread Starter essaund

    (@essaund)

    @daanvandenbergh ~ WOW!

    That was fast.

    I’m away from my machine now. Will test it in the next 12 hours.

    Thank you so so much for that.

    Thread Starter essaund

    (@essaund)

    @daanvandenbergh ~ I can confirm that it’s working.

    THANKS SO MUCH!!!

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Haha, awesome! ??

    Thanks for letting me know!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘CAOS Not Working Despite Code Being Detected on Website’ is closed to new replies.