[DigitalPoint] Better Google Analytics

[DigitalPoint] Better Google Analytics

No permission to download
Small fyi because I know you like attention to detail @digitalpoint.

The FA icon on the staff bar - it doesn't display if you have @Kirby's Font Awesome Manager installed. In Safari it actually does display the icon (at least for me) but in Firefox it doesn't. Obviously I have to add the icon to the FA manager and there isn't too much you can do on your end, but I guess you could ask Kirby to add the icon by default if it matters to you lol

I had the same issue when I first installed and learned how to use the FAM. You have to set the option for it to auto add, click through a few pages, then come back and turn it off and you'll see it learned what was needed and adds it automatically.
I had the same issue when I first installed and learned how to use the FAM. You have to set the option for it to auto add, click through a few pages, then come back and turn it off and you'll see it learned what was needed and adds it automatically.
Right. I have it all set but I was letting @digitalpoint know in case he wants to change that icon to one built into FAM or maybe have Kirby add that icon. I'm just suggesting for future users of both of those add-ons, because they might get confused.
Honestly probably not a lot I can do for that. If someone goes out of their way to use an addon that removes icons, I suppose it’s to be expected if icons get removed for them. Don’t want to force everyone to use different icons that might not be as good of a fit simply because a third party addon says these are the ones
Great plugin, thank you.

Can you consider adding an option to hide the icon in the status bar?
It's already fairly specific... it only shows if the user is an admin and they have the admin permission viewStatistics. It's also the only way to get page-specific analytics (that's the purpose of it, it's not just a deep link into the admin area because we think it's so great/useful). You could disable the template modification for it (you would lose the ability to view page-specific analytics of course), or just take away the admin's ability to viewStatistics if it's an issue of not wanting the admin to see your stats?
Love how this addon works on my 2.2 site, however on a 2.1 installation I get the following error. Any thoughts?

ErrorException: [E_WARNING] Declaration of DigitalPoint\Analytics\XF\Mail\Mailer::send(Swift_Mime_SimpleMessage $message, ?Swift_Transport $transport = NULL, ?array $queueEntry = NULL, $allowRetry = true) should be compatible with XF\Mail\Mailer::send(Swift_Mime_Message $message, ?Swift_Transport $transport = NULL, ?array $queueEntry = NULL, $allowRetry = true) in src/addons/DigitalPoint/Analytics/XF/Mail/Mailer.php at line 68
XF::handlePhpError() in src/addons/DigitalPoint/Analytics/XF/Mail/Mailer.php at line 7
include() in src/vendor/composer/ClassLoader.php at line 444
Composer\Autoload\includeFile() in src/vendor/composer/ClassLoader.php at line 322
class_exists() in src/XF/Extension.php at line 172
XF\Extension->extendClass() in src/XF/App.php at line 2668
XF\App->extendClass() in src/XF/App.php at line 943
XF\App->XF\{closure}() in src/XF/Container.php at line 28
XF\Container->offsetGet() in src/XF/App.php at line 2400
XF\App->mailer() in src/XF/Job/UserEmail.php at line 46
XF\Job\UserEmail->executeAction() in src/XF/Job/AbstractUserCriteriaJob.php at line 59
XF\Job\AbstractUserCriteriaJob->run() in src/XF/Admin/Controller/User.php at line 1001
XF\Admin\Controller\User->actionEmailSend() in src/XF/Mvc/Dispatcher.php at line 350
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2184
XF\App->run() in src/XF.php at line 391
XF::runApp() in admin.php at line 13
I've been trying to figure out a way to allow it to work with both 2.1 and 2.2 but I don't think there's going to be a way. It looks like 2.2 had a change to the Mailer class that slightly changed the send() method declaration.

The unfortunate thing is that the code in the method doesn't need to be changed, only the method declaration... if it was the other way around (needs a code change, but not a declaration change), it could be worked around with a simple if() statement (if $version is this, do this). A declaration change can be worked around as long as a server is running PHP 7.2 (it supports parameter type widening) or higher, but since the minimum required version of XenForo 2.2 is 7.0, that doesn't really work either. So the two options are either make the addon require XenForo 2.2 or allow XenForo 2.1, but make the minimum required version of PHP 7.2 (even for XF 2.2 installs).

So it's really going to come down to the less bad option here... and I think the less bad option is to just put a XF 2.2 requirement on it (the other option would make it not work with XF 2.2 installs that were running on PHP 7.0 or 7.1).

Going to think on it more to see if I can somehow come up with a way to do it and still support XF 2.1, but as of right now, I'd say you are probably going to have to update to XF 2.2 for the addon to work for you. If you really need it to work on XF 2.1 and you don't mind making a manual change to a PHP file every time you install the addon, I could show you how to do that...
digitalpoint updated [DigitalPoint] Better Google Analytics with a new update entry:

Requires XenForo 2.2 now

  • Require XF 2.2 or higher (incompatible Mailer class between XF 2.1 and 2.2)
  • Use <xf:fa /> for the staffBar now that XF requirement is 2.2+ (better compatibility with Font Awesome Manager)
If you aren't using Font Awesome Manager, nothing really changes with this update (if you were using XF 2.0 or 2.1, you would have gotten errors before, now it simply doesn't let you install unless you have...

Read the rest of this update entry...
I keep getting this server error. What could be the problem?

  • Generated by: Unknown account
  • Jun 5, 2023 at 6:15 PM

Stack trace​

#0 src/XF.php(219): XF\Error->logError('cURL error 7: F...', false)
#1 src/addons/DigitalPoint/Analytics/Repository/JavaScript.php(50): XF::logError('cURL error 7: F...')
#2 src/addons/DigitalPoint/Analytics/Pub/View/JavaScript/Proxy.php(9): DigitalPoint\Analytics\Repository\JavaScript->getFile()
#3 src/XF/Mvc/Renderer/AbstractRenderer.php(91): DigitalPoint\Analytics\Pub\View\JavaScript\Proxy->renderRaw()
#4 src/XF/Mvc/Renderer/Raw.php(39): XF\Mvc\Renderer\AbstractRenderer->renderViewObject('DigitalPoint\\An...', '', Array)
#5 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Raw->renderView('DigitalPoint\\An...', '', Array)
#6 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Raw), Object(XF\Mvc\Reply\View))
#7 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Raw), Object(XF\Mvc\Reply\View))
#8 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'raw')
#9 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#10 src/XF.php(524): XF\App->run()
#11 index.php(20): XF::runApp('XF\\Pub\\App')
#12 {main}

Request state​

array(4) {
["url"] => string(22) "/jc/gtm.js?_v=0462cb55"
["referrer"] => bool(false)
["_GET"] => array(1) {
["_v"] => string(8) "0462cb55"
["_POST"] => array(0) {
That's an issue with your server being able to communicate with Google's API servers for pulling a report.

Maybe not so coincidentally it's an IPv6 address it's can't talk to, so maybe your server is setup to resolve IPv6 addresses but doesn't actually have the capability to use IPv6. Either way, you are going to want to talk to your server admin on that. The IP address is correct, but your server can't make a connection to that IP for whatever reason and the probability that all Google data centers are down and unreachable is basically zero.
  • Like
Reactions: Gr8
I have asked my host to activate IPv6, and still getting this error:

  • Generated by: Unknown account
  • Jun 10, 2023 at 3:59 AM

Stack trace​

#0 src/XF.php(219): XF\Error->logError('cURL error 28: ...', false)
#1 src/addons/DigitalPoint/Analytics/Repository/JavaScript.php(50): XF::logError('cURL error 28: ...')
#2 src/addons/DigitalPoint/Analytics/Cron/CleanUp.php(24): DigitalPoint\Analytics\Repository\JavaScript->getFile('gtm', true)
#3 src/XF/Job/Cron.php(37): DigitalPoint\Analytics\Cron\CleanUp::runHourlyCleanUp(Object(XF\Entity\CronEntry))
#4 src/XF/Job/Manager.php(260): XF\Job\Cron->run(8)
#5 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#6 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#7 job.php(43): XF\Job\Manager->runQueue(false, 8)
#8 {main}

Request state​

array(4) {
["url"] => string(8) "/job.php"
["referrer"] => string(59) "https://www.vetelib.com/?s=eb17dd59d4295a906a0d86c99bc6c632"
["_GET"] => array(0) {
["_POST"] => array(0) {
Looks like they didn’t enable it or they didn’t configure it properly. There’s not anything I’m able to do on this end if your server can’t connect to Google servers. That’s a network connectivity issue that only your host/server admin can (properly) solve.
  • Like
Reactions: Gr8
I have a question. Where do I see all the analytic results? I installed it a few days ago and all I see in my admin panel is Google Analytics Real time of a map. Thanks
This is likely a GA4 issue and not an issue with the add-on, but for some reason GA4 refuses to show sign_up as a conversion despite the fact that I have it marked as a conversion:


If I go to Engagement -> Conversions, it does not show any data for sign_up.

Any ideas from someone else who has had this issue? :D
If you select a different event as a conversion just to test, do those show up? Just wondering if it’s an issue with just the sign_up event or their whole conversion report.
Top Bottom