[DigitalPoint] Better Google Analytics

[DigitalPoint] Better Google Analytics 1.1.1

No permission to download
I’ve had to disable the add-on because I’ve been monitoring my statistics on Google Analytics and it’s showing 0 active users most of the time, in the real time report as soon as I disabled it, it started showing the real active users online. Any reason why this may be?
 
I’ve had to disable the add-on because I’ve been monitoring my statistics on Google Analytics and it’s showing 0 active users most of the time, in the real time report as soon as I disabled it, it started showing the real active users online. Any reason why this may be?
Hard to say without having access to anything. Not sure what site, don't know your Analytics property IDs, don't know your measurement IDs, etc.

Some things you could check though... Look at network activity from a browser and first see if making the logging requests to https://www.google-analytics.com/g/collect if it is, make sure the tid matches your measurement ID. If that checks out, then the system is trying to log it to the correct property/data stream. That's a good first step... then you can figure out either why it's not trying to log or why Google Analytics isn't showing what was logged.

I'd also check the obvious like any console errors in the browser.

Have you made any major configuration changes (like changing the data stream or measurement ID) for the property?

You could also just disable serving the Google Tag Manager JavaScript from your own domain and see if it's an issue with that.
 
Similarly GA4 was showing zero users until I disabled the serving from own domain option.

No errors to show for it.
 
I’ve had to disable the add-on because I’ve been monitoring my statistics on Google Analytics and it’s showing 0 active users most of the time, in the real time report as soon as I disabled it, it started showing the real active users online. Any reason why this may be?
Similarly GA4 was showing zero users until I disabled the serving from own domain option.

No errors to show for it.

Mine works fine:
1653362623225.webp

I think you are using Nginx, you must incorporate this changes also:
 
Similarly GA4 was showing zero users until I disabled the serving from own domain option.

No errors to show for it.
Have you done anything out of the ordinary as far as your Google Analytics settings? I wonder if there's some setting buried in Google Analytics that causes a unique set of Google Tag Manager JavaScript to be served to each user for some reason... Like have you guys overridden the regions that Google signal data can be collected? (that's one thing I can think of that might serve something different to each user since it's region-based).

If someone that's having that issue is willing to give me temporary admin access to their property in Google Analytics, I can go through each setting that's set and compare it to a setup that works as intended.
 
Hard to say without having access to anything. Not sure what site, don't know your Analytics property IDs, don't know your measurement IDs, etc.

Some things you could check though... Look at network activity from a browser and first see if making the logging requests to https://www.google-analytics.com/g/collect if it is, make sure the tid matches your measurement ID. If that checks out, then the system is trying to log it to the correct property/data stream. That's a good first step... then you can figure out either why it's not trying to log or why Google Analytics isn't showing what was logged.

I'd also check the obvious like any console errors in the browser.

Have you made any major configuration changes (like changing the data stream or measurement ID) for the property?

You could also just disable serving the Google Tag Manager JavaScript from your own domain and see if it's an issue with that.
I’ll take a look later when I’m on the desktop.

Mine works fine:
View attachment 268731

I think you are using Nginx, you must incorporate this changes also:
What changes? That link doesn’t specify what changes to make.

Have you done anything out of the ordinary as far as your Google Analytics settings? I wonder if there's some setting buried in Google Analytics that causes a unique set of Google Tag Manager JavaScript to be served to each user for some reason... Like have you guys overridden the regions that Google signal data can be collected? (that's one thing I can think of that might serve something different to each user since it's region-based).

If someone that's having that issue is willing to give me temporary admin access to their property in Google Analytics, I can go through each setting that's set and compare it to a setup that works as intended.
I haven’t made ANY changes to my GA since I signed up years ago. I’m happy to give access but is there a way to just give access to GA and not my whole Google account? If so, I can set it up later if you can tell me how that’s done.
 
Mine works fine:
View attachment 268731

I think you are using Nginx, you must incorporate this changes also:

Also, that screenshot shows the statistics in the XF Admin CP. I'm talking about the realtime users on Google Analytics itself.
 
I haven’t made ANY changes to my GA since I signed up years ago. I’m happy to give access but is there a way to just give access to GA and not my whole Google account? If so, I can set it up later if you can tell me how that’s done.
Ya, I definitely don't want access to your Google account. In Google Analytics, down at the bottom, the "Admin" link that takes you into your normal settings for Analytics accounts and properties... in the property section, there's a Property Access Management section, where you can add users to the property. I think just the Viewer role would suffice (read only access to configuration settings for the property). If you want to me to look through your property settings and compare it side by side to the properties I have that I know are working as expected, I can do that (start a private conversation with me here and I'll send you my Google account email address).
 
Looking great but I'm unable to get past the first part of the setup. The measurement id field doesn't allow me to add anything, and if I link my google account - it doesn't change anything. Not sure if I'm missing something.

Thank you
 
Looking great but I'm unable to get past the first part of the setup. The measurement id field doesn't allow me to add anything, and if I link my google account - it doesn't change anything. Not sure if I'm missing something.

Thank you
Link your Google Account, then click the pointer icon next to the measurement ID. That should allow you to select your measurement ID. If not, what error are you getting?
 
Link your Google Account, then click the pointer icon next to the measurement ID. That should allow you to select your measurement ID. If not, what error are you getting?
Thanks for your quick reply -

Upon doing this, I get this error -

Oops! We ran into some problems.
ParseError: syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in src/addons/DigitalPoint/Analytics/GoogleApi/Admin.php at line 8
  1. Composer\Autoload\includeFile() in src/vendor/composer/ClassLoader.php at line 346
  2. Composer\Autoload\ClassLoader->loadClass()
  3. spl_autoload_call() in src/addons/DigitalPoint/Analytics/Repository/Reporting.php at line 544
  4. DigitalPoint\Analytics\Repository\Reporting->getAdminApi() in src/addons/DigitalPoint/Analytics/Repository/Reporting.php at line 11
  5. DigitalPoint\Analytics\Repository\Reporting->getAccountSummaries() in src/addons/DigitalPoint/Analytics/XF/Admin/Controller/Option.php at line 111
  6. DigitalPoint\Analytics\XF\Admin\Controller\Option->actionGoogleAnalyticsSelect() in src/XF/Mvc/Dispatcher.php at line 352
  7. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
  8. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
  9. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
  10. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2352
  11. XF\App->run() in src/XF.php at line 524
  12. XF::runApp() in admin.php at line 13
 
Augh... I forgot old versions of PHP don't support typed properties. Just to be 100% certain that's what's going on, you are using an end-of-life version of PHP (7.3 or less), right?
 
Correct. Currently using 7.3 - Though I do intend to upgrade at some point on my next day off (I have the kind of luck where things implode and then have no time to fix)
 
Correct. Currently using 7.3 - Though I do intend to upgrade at some point on my next day off (I have the kind of luck where things implode and then have no time to fix)
It's an easy enough fix (already fixed it on this end), just wanted to make sure it wasn't something else.

Basically what happened is this addon was originally intended for in-house use only so I wasn't really paying attention to old versions of PHP. Then I decided to release it and I had to go and make a few changes to support older versions of PHP. And simply forgot about typed properties. I'll do a new build and shoot it to you via conversation (there's some other changes and don't want to be pumping out new versions daily that people think they need to update every day). :)
 
Can you post your Nginx config for your domain? I'm guessing you are probably doing something like setting special headers for JavaScript files and taking some liberties with that config like not passing the request along the chain and not checking if the file actually exists before you tell Nginx to stop further processing.

Or maybe you've told Nginx to assume the javascript "directory" really is there and is just static content?

Should be easy to spot if you post your config. :)
 
Back
Top Bottom