[DigitalPoint] Better Google Analytics

[DigitalPoint] Better Google Analytics 1.1.1

No permission to download
After upgrading from XF 2.2.15 to 2.2.16PL2, getting this error:

  • ErrorException: [E_DEPRECATED] explode(): Passing null to parameter #2 ($string) of type string is deprecated
  • src/addons/DigitalPoint/Analytics/Pub/Controller/Beacon.php:29
#0 [internal function]: XF::handlePhpError(8192, '[E_DEPRECATED] ...', '/home/talkbass/...', 29)
#1 src/addons/DigitalPoint/Analytics/Pub/Controller/Beacon.php(29): explode('|', NULL, 2)
#2 src/XF/Mvc/Dispatcher.php(352): DigitalPoint\Analytics\Pub\Controller\Beacon->actionImage(Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(258): XF\Mvc\Dispatcher->dispatchClass('DigitalPoint\\An...', 'Image', Object(XF\Mvc\RouteMatch), Object(DigitalPoint\Analytics\Pub\Controller\Beacon), NULL)
#4 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(DigitalPoint\Analytics\Pub\Controller\Beacon), NULL)
#5 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#6 src/XF/App.php(2485): XF\Mvc\Dispatcher->run()
#7 src/XF.php(524): XF\App->run()
#8 index.php(20): XF::runApp('XF\\Pub\\App')
#9 {main}

Request state​

array(4) {
["url"] => string(217) "/b/image.gif?p=4isFKkQtlABI%2FyMHS8U0HXqcqj%2FJNd6D%2BrOkMACCUIr9KmaosgU2Id8xykwVSsqdVZg1XE%2FLV4VY8vyC7IJV%2FEx51ylDEQXPV1j%2Fy5aapxFOuYyOn705QLh1msjTOFQOTugKnY3JYb39fB9X1Od0DhQTsNa%2FeYa5jsQvgRxWJ0Fe7mTWoFNb8FgKbxmV"
["referrer"] => bool(false)
["_GET"] => array(1) {
["/404_html"] => string(0) ""
}
["_POST"] => array(0) {
}
}
Are you using the latest version of this addon?
 
Yes 1.0.11.1
I can’t 100% say what’s going on (I don’t have access to a computer for a few more days), but I’m guessing the encrypted payload was altered or the private key used to decrypt it was changed. It shouldn’t be too hard to ignore it if the payload can’t be decrypted for whatever reason, but will have to wait a few days for an update (you know… the no computer right now thing).
 
Have an error running the latest version (1.0.11.1) on 2.3:

  • Error: Call to undefined method Symfony\Component\Mime\Message::getTo()
  • src/addons/DigitalPoint/Analytics/XF/Mail/Mailer.php:78
  • Generated by: Unknown account
  • Jul 13, 2024 at 5:47 PM

Stack trace​

#0 src/XF/Job/MailSend.php(37): DigitalPoint\Analytics\XF\Mail\Mailer->send(Object(Symfony\Component\Mime\Message))
#1 src/XF/Job/Manager.php(275): XF\Job\MailSend->run(8)
#2 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#3 src/XF/Job/Manager.php(89): XF\Job\Manager->runJobEntry(Array, 8)
#4 job.php(46): XF\Job\Manager->runQueue(false, 8)
#5 {main}

Request state​

array(4) {
["url"] => string(8) "/job.php"
["referrer"] => string(22) "-snip"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
I can’t 100% say what’s going on (I don’t have access to a computer for a few more days), but I’m guessing the encrypted payload was altered or the private key used to decrypt it was changed. It shouldn’t be too hard to ignore it if the payload can’t be decrypted for whatever reason, but will have to wait a few days for an update (you know… the no computer right now thing).
This is still generating errors whenever an e-mail is sent due to vendor package changes I believe... need further 2.3 update.
 
Getting this error attempting to install on a clean XF 2.3 (PHP 8.2) installation:

Code:
Server error log

    Error: Undefined constant "DigitalPoint\Analytics\SODIUM_CRYPTO_SECRETBOX_KEYBYTES" src/addons/DigitalPoint/Analytics/Setup.php:37

    Generated by: XF Dev2 Jul 16, 2024 at 2:08 AM

Stack trace

#0 src/XF/AddOn/AddOn.php(575): DigitalPoint\Analytics\Setup->postInstall(Array)
#1 src/XF/Job/AddOnInstallBatch.php(389): XF\AddOn\AddOn->postInstall(Array)
#2 src/XF/Job/AddOnInstallBatch.php(103): XF\Job\AddOnInstallBatch->stepFinalize(Object(XF\Timer))
#3 src/XF/Job/Manager.php(275): XF\Job\AddOnInstallBatch->run(8)
#4 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#5 src/XF/Job/Manager.php(121): XF\Job\Manager->runJobEntry(Array, 8)
#6 src/XF/Admin/Controller/ToolsController.php(146): XF\Job\Manager->runByIds(Array, 8)
#7 src/XF/Mvc/Dispatcher.php(362): XF\Admin\Controller\ToolsController->actionRunJob(Object(XF\Mvc\ParameterBag))
#8 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#9 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#10 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#11 src/XF/App.php(2777): XF\Mvc\Dispatcher->run()
#12 src/XF.php(798): XF\App->run()
#13 admin.php(15): XF::runApp('XF\\Admin\\App')
#14 {main}

Request state

array(4) {
  ["url"] => string(29) "/xf/admin.php?tools/run-job"
  ["referrer"] => string(57) "https://dev2.domain.com/xf/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(93) "https://dev2.domain.com/xf/admin.php?add-ons/install-from-archive-complete&batch_id=11"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(3) "319"
  }
}
 
digitalpoint updated [DigitalPoint] Better Google Analytics with a new update entry:

XenForo 2.3 updates (mostly)

XenForo 2.3 updates:
  • Updated overlay page tracking to work with lazy loaded core XenForo JavaScript
  • Fixed compatibility issue with email tracking in XenForo 2.3 (different getTo() method)
  • Changed verbiage from "conversation" to "direct message" on settings when using XenForo 2.3
Other:
  • Don't try to generate an encryption key during setup if Sodium extension isn't installed
  • Ignore invalid payload for email tracking (if payload can't be decrypted for...

Read the rest of this update entry...
 
Hi, i got this error after update:

  • TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given
  • src/addons/DigitalPoint/Analytics/Pub/Controller/Beacon.php:31
  • Generado por: Cuenta desconocida
  • 19 Jul 2024 a la(s) 16:59
#0 src/addons/DigitalPoint/Analytics/Pub/Controller/Beacon.php(31): count('')
#1 src/XF/Mvc/Dispatcher.php(352): DigitalPoint\Analytics\Pub\Controller\Beacon->actionImage(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(258): XF\Mvc\Dispatcher->dispatchClass('DigitalPoint\\An...', 'Image', Object(XF\Mvc\RouteMatch), Object(DigitalPoint\Analytics\Pub\Controller\Beacon), NULL)
#3 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(DigitalPoint\Analytics\Pub\Controller\Beacon), NULL)
#4 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(2485): XF\Mvc\Dispatcher->run()
#6 src/XF.php(524): XF\App->run()
#7 index.php(20): XF::runApp('XF\\Pub\\App')
#8 {main}
 
Hi, i got this error after update:

  • TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given
  • src/addons/DigitalPoint/Analytics/Pub/Controller/Beacon.php:31
  • Generado por: Cuenta desconocida
  • 19 Jul 2024 a la(s) 16:59
#0 src/addons/DigitalPoint/Analytics/Pub/Controller/Beacon.php(31): count('')
#1 src/XF/Mvc/Dispatcher.php(352): DigitalPoint\Analytics\Pub\Controller\Beacon->actionImage(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(258): XF\Mvc\Dispatcher->dispatchClass('DigitalPoint\\An...', 'Image', Object(XF\Mvc\RouteMatch), Object(DigitalPoint\Analytics\Pub\Controller\Beacon), NULL)
#3 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(DigitalPoint\Analytics\Pub\Controller\Beacon), NULL)
#4 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(2485): XF\Mvc\Dispatcher->run()
#6 src/XF.php(524): XF\App->run()
#7 index.php(20): XF::runApp('XF\\Pub\\App')
#8 {main}
Also got about a dozen of these over the last 15 minutes...

1721591710986.webp
 
This is running XenForo 2.2.16 and addon version 1.1.0
It's been fixed for the next version, although normally you shouldn't be getting those. It stems from an inability to decrypt something. So either the server can no longer decrypt something it once was able to (maybe the Sodium extension was installed [or uninstalled] from PHP) or the client (user's browser) is altering the encrypted payload. If it's something you are seeing on a regular basis, it's most likely some config change on your server between the time the email was sent vs. when it was read. New version doesn't fix the inability to decrypt it (that's not something that can be fixed), but it will ignore it (nothing you can do with the data if you can't see/decrypt it).
 
It's been fixed for the next version, although normally you shouldn't be getting those. It stems from an inability to decrypt something. So either the server can no longer decrypt something it once was able to (maybe the Sodium extension was installed [or uninstalled] from PHP) or the client (user's browser) is altering the encrypted payload. If it's something you are seeing on a regular basis, it's most likely some config change on your server between the time the email was sent vs. when it was read. New version doesn't fix the inability to decrypt it (that's not something that can be fixed), but it will ignore it (nothing you can do with the data if you can't see/decrypt it).
Just looked and php-Sodium was not installed on that server. I believe Sodium has never been installed on that server. Is this a new requirement of the addon?
 
Just looked and php-Sodium was not installed on that server. I believe Sodium has never been installed on that server. Is this a new requirement of the addon?
The only "requirement" is that Sodium either stays installed (or uninstalled). It would only be an issue if it was once installed and then got uninstalled, or was once uninstalled and then installed. If it's not installed now, I bet it was once installed.

If an email was sent when Sodium was installed, it will encrypt a bit of info about the email so we can record some info when that email is read. Let's say Sodium was then uninstalled, the server no longer has a way to unencrypt that payload it gets when the email was read (which obviously is going to be a different time/date than when the email was sent). That's what you are seeing... the inability for your server to decrypt some info about the email being read.
 
Getting this error trying to add and select a new property from the ACP (XF 2.3):

Code:
Server error log

    InvalidArgumentException: uid is a reserved parameter_name and cannot be used. src/addons/DigitalPoint/Analytics/GoogleApi/AbstractApi.php:31

    Generated by: Admin Jul 23, 2024 at 10:30 AM

Stack trace

#0 src/addons/DigitalPoint/Analytics/GoogleApi/Admin.php(123): DigitalPoint\Analytics\GoogleApi\AbstractApi->makeApiCall('properties/4511...', Array)
#1 src/addons/DigitalPoint/Analytics/Repository/Reporting.php(131): DigitalPoint\Analytics\GoogleApi\Admin->createCustomDimension('properties/4511...', 'USER', 'uid', 'User ID', 'The registered ...')
#2 src/addons/DigitalPoint/Analytics/Repository/Reporting.php(121): DigitalPoint\Analytics\Repository\Reporting->createCustomDimension('USER', 'uid', 'User ID', 'The registered ...')
#3 src/addons/DigitalPoint/Analytics/XF/Admin/Controller/Option.php(90): DigitalPoint\Analytics\Repository\Reporting->createNeededDimensions()
#4 src/XF/Mvc/Dispatcher.php(362): DigitalPoint\Analytics\XF\Admin\Controller\Option->actionGoogleAnalyticsSelect(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Option', 'GoogleAnalytics...', Object(XF\Mvc\RouteMatch), Object(SV\PostFriction\XF\Admin\Controller\Option), NULL)
#6 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\PostFriction\XF\Admin\Controller\Option), NULL)
#7 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(2777): XF\Mvc\Dispatcher->run()
#9 src/XF.php(798): XF\App->run()
#10 admin.php(15): XF::runApp('XF\\Admin\\App')
#11 {main}
 
The only "requirement" is that Sodium either stays installed (or uninstalled). It would only be an issue if it was once installed and then got uninstalled, or was once uninstalled and then installed. If it's not installed now, I bet it was once installed.

If an email was sent when Sodium was installed, it will encrypt a bit of info about the email so we can record some info when that email is read. Let's say Sodium was then uninstalled, the server no longer has a way to unencrypt that payload it gets when the email was read (which obviously is going to be a different time/date than when the email was sent). That's what you are seeing... the inability for your server to decrypt some info about the email being read.

Gotcha. Sodium was likely installed on the previous server this particular XenForo / DP Google Analytics addon combo migrated from.
 
Getting this error trying to add and select a new property from the ACP (XF 2.3):

Code:
Server error log

    InvalidArgumentException: uid is a reserved parameter_name and cannot be used. src/addons/DigitalPoint/Analytics/GoogleApi/AbstractApi.php:31

    Generated by: Admin Jul 23, 2024 at 10:30 AM

Stack trace

#0 src/addons/DigitalPoint/Analytics/GoogleApi/Admin.php(123): DigitalPoint\Analytics\GoogleApi\AbstractApi->makeApiCall('properties/4511...', Array)
#1 src/addons/DigitalPoint/Analytics/Repository/Reporting.php(131): DigitalPoint\Analytics\GoogleApi\Admin->createCustomDimension('properties/4511...', 'USER', 'uid', 'User ID', 'The registered ...')
#2 src/addons/DigitalPoint/Analytics/Repository/Reporting.php(121): DigitalPoint\Analytics\Repository\Reporting->createCustomDimension('USER', 'uid', 'User ID', 'The registered ...')
#3 src/addons/DigitalPoint/Analytics/XF/Admin/Controller/Option.php(90): DigitalPoint\Analytics\Repository\Reporting->createNeededDimensions()
#4 src/XF/Mvc/Dispatcher.php(362): DigitalPoint\Analytics\XF\Admin\Controller\Option->actionGoogleAnalyticsSelect(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Option', 'GoogleAnalytics...', Object(XF\Mvc\RouteMatch), Object(SV\PostFriction\XF\Admin\Controller\Option), NULL)
#6 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\PostFriction\XF\Admin\Controller\Option), NULL)
#7 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(2777): XF\Mvc\Dispatcher->run()
#9 src/XF.php(798): XF\App->run()
#10 admin.php(15): XF::runApp('XF\\Admin\\App')
#11 {main}
Well isn't that annoying that they decided to make something we are using a "reserved" name. Oh well... will change it.
 
Getting this error trying to add and select a new property from the ACP (XF 2.3):

Code:
Server error log

    InvalidArgumentException: uid is a reserved parameter_name and cannot be used. src/addons/DigitalPoint/Analytics/GoogleApi/AbstractApi.php:31

    Generated by: Admin Jul 23, 2024 at 10:30 AM

Stack trace

#0 src/addons/DigitalPoint/Analytics/GoogleApi/Admin.php(123): DigitalPoint\Analytics\GoogleApi\AbstractApi->makeApiCall('properties/4511...', Array)
#1 src/addons/DigitalPoint/Analytics/Repository/Reporting.php(131): DigitalPoint\Analytics\GoogleApi\Admin->createCustomDimension('properties/4511...', 'USER', 'uid', 'User ID', 'The registered ...')
#2 src/addons/DigitalPoint/Analytics/Repository/Reporting.php(121): DigitalPoint\Analytics\Repository\Reporting->createCustomDimension('USER', 'uid', 'User ID', 'The registered ...')
#3 src/addons/DigitalPoint/Analytics/XF/Admin/Controller/Option.php(90): DigitalPoint\Analytics\Repository\Reporting->createNeededDimensions()
#4 src/XF/Mvc/Dispatcher.php(362): DigitalPoint\Analytics\XF\Admin\Controller\Option->actionGoogleAnalyticsSelect(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Option', 'GoogleAnalytics...', Object(XF\Mvc\RouteMatch), Object(SV\PostFriction\XF\Admin\Controller\Option), NULL)
#6 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\PostFriction\XF\Admin\Controller\Option), NULL)
#7 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(2777): XF\Mvc\Dispatcher->run()
#9 src/XF.php(798): XF\App->run()
#10 admin.php(15): XF::runApp('XF\\Admin\\App')
#11 {main}
Still not listed as a reserved name on their documentation. Maybe I'll give it a couple days just in case it's still not supposed to be reserved.

 
Back
Top Bottom