eva2000
Well-known member
yum updates for nss package https://community.centminmod.com/threads/curl-error-77-on-xenforo-v2-2-13.24174/I suddenly have a lot of various server errors related to your addon
yum updates for nss package https://community.centminmod.com/threads/curl-error-77-on-xenforo-v2-2-13.24174/I suddenly have a lot of various server errors related to your addon
- ErrorException: Google Analytics Measurement protocol debug: { "validationMessages": [ ] }
- src/XF/Error.php:77
stack trace
#0 src/XF.php(219): XF\Error->logError('Google Analytic...', false)
#1 src/addons/DigitalPoint/Analytics/GoogleApi/Measurement.php(25): XF::logError('Google Analytic...')
#2 src/addons/DigitalPoint/Analytics/Repository/Measurement.php(11): DigitalPoint\Analytics\GoogleApi\Measurement->__destruct()
#3 src/addons/DigitalPoint/Analytics/Pub/Controller/Beacon.php(44): DigitalPoint\Analytics\Repository\Measurement->collect('46da7701-bb8c-4...', Array, '47641')
#4 src/XF/Mvc/Dispatcher.php(352): DigitalPoint\Analytics\Pub\Controller\Beacon->actionImage(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('DigitalPoint\\An...', 'Image', Object(XF\Mvc\RouteMatch), Object(DigitalPoint\Analytics\Pub\Controller\Beacon), NULL)
#6 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(DigitalPoint\Analytics\Pub\Controller\Beacon), NULL)
#7 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#9 src/XF.php(524): XF\App->run()
#10 index.php(20): XF::runApp('XF\\Pub\\App')
#11 {main}
Request state
array(4) {
["url"] => string(165) "/b/image.gif?p=gNtoqeiJm5cUSqRnYICaeatnUcBcmYyEp%2Foxc8wBp1ZNVtPQqzsiNbTDb%2FzjjbVleCW%2Bx091eM09R3hT4D1oGbOYNbAi7gWm1nyb8ZgGzgArbuOOTjFS8SaPAMwuEYYOx8Y6sBwSBg%3D%3D"
["referrer"] => bool(false)
["_GET"] => array(1) {
["p"] => string(140) "gNtoqeiJm5cUSqRnYICaeatnUcBcmYyEp/oxc8wBp1ZNVtPQqzsiNbTDb/zjjbVleCW+x091eM09R3hT4D1oGbOYNbAi7gWm1nyb8ZgGzgArbuOOTjFS8SaPAMwuEYYOx8Y6sBwSBg=="
}
["_POST"] => array(0) {
}
}
Yep, if you turn on debugging mode, you are going to get debugging info (it should be off by default, and only available to see/turn on if you have advanced options enabled).i notice there are posts from a year ago that state to turn off debug mode, is that still correct for this error ?
Enables debugging so you can see events come across DebugView in Google Analytics. Additionally, this adds a debugging entry to your server error log when the Measurement Protocol is used for server-side events (for example emails being sent/viewed).
It is not. Zaraz is custom system that relays events to Cloudflare via their backend. The only events you can use are the ones Zaraz has defined, and they have very few events they understand. See their developer reference here: https://developers.cloudflare.com/zaraz/web-api/
Coincidentally, this add-on started as a Zaraz add-on, but there were just too many limitations (GA4 events you couldn't use), too many bugs, and you are really flying blind (you send events to Zaraz and have no clue how [or even if] it's translating that on their backend). The main thing I wanted Zaraz for was so I could call the analytics JavaScript from my own domain vs. from googletagmanager.com.
There were just too many problems and limitations with Zaraz for my liking, so I turned this add-on into a specific Google Analytics add-on. And theHost Google Tag Manager JavaScript on your own domain
setting I made for this add-on solved the thing that made me want to use Zaraz.
From Cloudflare's developer Discord in the #zaraz channel...
View attachment 269980
Notice the date on that was a few weeks before this add-on was released. That was basically when I decided I was tired of fighting with Zaraz's limitations and I'd be better off doing what I want directly.
But to answer your question, no... Zaraz is it's own thing and you can't send Google Analytics events (directly) to Zaraz. Rather you have to send Zaraz events (which there aren't many of) and it will translate them into Google Analytics for you. Zaraz is pretty good at a really vanilla Google Analytics replacement (like if you just wanted to track page views). For anything more advanced, it's not that great.
Not really... you just don't have the flexibility to do things you want to do (like track custom things). Zaraz ends up dumbing down GA4 to the lowest common denominator of all the analytics systems it supports. Since it's a one-size fits all thing, it works okay if you are just trying to do basic things like page view tracking, but beyond that it's pretty limited.I'm wondering if your opinion of Zaraz has changed any over the past couple years. We did have Zaraz set up with GA4, took it down for a while because engagement time was way off. They've since fixed that issue and I have it set up again. Seems to be working fine. Also using their custom HTML tool to put in a couple other scripts.
Server error log
XF\ConnectedAccount\Http\HttpResponseException: Failed to refresh OAuth access token for baAnalyticsCredentials: Failed to request resource. HTTP Code: 400 src/XF/ConnectedAccount/Http/Client.php:67
Generated by: smooth-c 22 January 2024 at 9:36 PM
Stack trace
#0 src/vendor/lusitanian/oauth/src/OAuth/OAuth2/Service/AbstractService.php(224): XF\ConnectedAccount\Http\Client->retrieveResponse(Object(OAuth\Common\Http\Uri\Uri), Array, Array)
#1 src/addons/DigitalPoint/Analytics/Repository/Analytics.php(50): OAuth\OAuth2\Service\AbstractService->refreshAccessToken(Object(OAuth\OAuth2\Token\StdOAuth2Token))
#2 src/addons/DigitalPoint/Analytics/GoogleApi/AbstractApi.php(39): DigitalPoint\Analytics\Repository\Analytics->refreshAnalyticsTokenIfNeeded()
#3 src/addons/DigitalPoint/Analytics/GoogleApi/AbstractApi.php(11): DigitalPoint\Analytics\GoogleApi\AbstractApi->getToken()
#4 src/addons/DigitalPoint/Analytics/GoogleApi/Data.php(27): DigitalPoint\Analytics\GoogleApi\AbstractApi->makeApiCall('properties/3164...', Array)
#5 src/addons/DigitalPoint/Analytics/Repository/Reporting.php(164): DigitalPoint\Analytics\GoogleApi\Data->runRealtimeReport('properties/3164...', Array)
#6 src/addons/DigitalPoint/Analytics/Repository/Reporting.php(563): DigitalPoint\Analytics\Repository\Reporting->runRealtimeReport(Array)
#7 src/addons/DigitalPoint/Analytics/Template/Callback/Analytics.php(167): DigitalPoint\Analytics\Repository\Reporting->getRealtime()
#8 src/XF/Template/Templater.php(1695): DigitalPoint\Analytics\Template\Callback\Analytics::getRealtime('', Array, Object(SV\AdvancedBbCodesPack\XF\Template\Templater))
#9 internal_data/code_cache/templates/l1/s0/admin/index.php(208): XF\Template\Templater->callback('DigitalPoint\\An...', 'getRealtime', '', Array)
#10 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(SV\AdvancedBbCodesPack\XF\Template\Templater), Array, NULL)
#11 src/addons/MaZ/AMP/Traits/Templater/XF22.php(52): XF\Template\Templater->renderTemplate('index', Array, true, NULL)
#12 src/addons/MaZ/AUN/XF/Template/Templater.php(39): MaZ\AMP\XF\Template\Templater->renderTemplate('admin:index', Array, true, NULL)
#13 src/XF/Template/Template.php(24): MaZ\AUN\XF\Template\Templater->renderTemplate('admin:index', Array)
#14 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#15 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Index', 'admin:index', Array)
#16 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#17 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#18 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#19 src/XF/App.php(2352): XF\Mvc\Dispatcher->run()
#20 src/XF.php(524): XF\App->run()
#21 admin.php(13): XF::runApp('XF\\Admin\\App')
#22 {main}
Request state
array(4) {
["url"] => string(10) "/admin.php"
["referrer"] => string(41) "https://www.ddhp"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
Looks like something is wrong with your OAuth token. If it's something consistent (API calls aren't working at all, at any point), try relinking your Google Analytics account (it doesn't hurt to do that even if it works sometimes). It could be a scenario where permission was granted initially but then revoked later at the Google Account level (your XenForo install has a OAuth token, but it's no longer valid because it was revoked). In that scenario, when it tries to exchange an expired token for a new one, it fails because the old one was revoked.Hey @digitalpoint I hope you're well.
I've been getting repeated errors such as this - Just thought I'd check in and see if you have any tips. Many thanks
Code:Server error log XF\ConnectedAccount\Http\HttpResponseException: Failed to refresh OAuth access token for baAnalyticsCredentials: Failed to request resource. HTTP Code: 400 src/XF/ConnectedAccount/Http/Client.php:67 Generated by: smooth-c 22 January 2024 at 9:36 PM Stack trace #0 src/vendor/lusitanian/oauth/src/OAuth/OAuth2/Service/AbstractService.php(224): XF\ConnectedAccount\Http\Client->retrieveResponse(Object(OAuth\Common\Http\Uri\Uri), Array, Array) #1 src/addons/DigitalPoint/Analytics/Repository/Analytics.php(50): OAuth\OAuth2\Service\AbstractService->refreshAccessToken(Object(OAuth\OAuth2\Token\StdOAuth2Token)) #2 src/addons/DigitalPoint/Analytics/GoogleApi/AbstractApi.php(39): DigitalPoint\Analytics\Repository\Analytics->refreshAnalyticsTokenIfNeeded() #3 src/addons/DigitalPoint/Analytics/GoogleApi/AbstractApi.php(11): DigitalPoint\Analytics\GoogleApi\AbstractApi->getToken() #4 src/addons/DigitalPoint/Analytics/GoogleApi/Data.php(27): DigitalPoint\Analytics\GoogleApi\AbstractApi->makeApiCall('properties/3164...', Array) #5 src/addons/DigitalPoint/Analytics/Repository/Reporting.php(164): DigitalPoint\Analytics\GoogleApi\Data->runRealtimeReport('properties/3164...', Array) #6 src/addons/DigitalPoint/Analytics/Repository/Reporting.php(563): DigitalPoint\Analytics\Repository\Reporting->runRealtimeReport(Array) #7 src/addons/DigitalPoint/Analytics/Template/Callback/Analytics.php(167): DigitalPoint\Analytics\Repository\Reporting->getRealtime() #8 src/XF/Template/Templater.php(1695): DigitalPoint\Analytics\Template\Callback\Analytics::getRealtime('', Array, Object(SV\AdvancedBbCodesPack\XF\Template\Templater)) #9 internal_data/code_cache/templates/l1/s0/admin/index.php(208): XF\Template\Templater->callback('DigitalPoint\\An...', 'getRealtime', '', Array) #10 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(SV\AdvancedBbCodesPack\XF\Template\Templater), Array, NULL) #11 src/addons/MaZ/AMP/Traits/Templater/XF22.php(52): XF\Template\Templater->renderTemplate('index', Array, true, NULL) #12 src/addons/MaZ/AUN/XF/Template/Templater.php(39): MaZ\AMP\XF\Template\Templater->renderTemplate('admin:index', Array, true, NULL) #13 src/XF/Template/Template.php(24): MaZ\AUN\XF\Template\Templater->renderTemplate('admin:index', Array) #14 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render() #15 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Index', 'admin:index', Array) #16 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View)) #17 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View)) #18 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html') #19 src/XF/App.php(2352): XF\Mvc\Dispatcher->run() #20 src/XF.php(524): XF\App->run() #21 admin.php(13): XF::runApp('XF\\Admin\\App') #22 {main} Request state array(4) { ["url"] => string(10) "/admin.php" ["referrer"] => string(41) "https://www.ddhp" ["_GET"] => array(0) { } ["_POST"] => array(0) { } }
Thank you
I turned it on prior to the server migration but no error, these only show up after the move so I worry if it's something I need to change because of the new server. Is it?Turn off the debugging option. It's off by default and only able to be seen if you have advanced options enabled.
View attachment 298737
Well I can’t really speak as to why it wouldn’t have done the same on the old server, but what you are seeing there (debugging info sent to your server error log when the debug option is on) is how it’s intended to work.I turned it on prior to the server migration but no error, these only show up after the move so I worry if it's something I need to change because of the new server. Is it?
I have turn it off now.
Minimal Google Analytics Snippet
A simple snippet for tracking page views on your website without having to add external libraries. Also works for single page applications made with the likes of react and vue.js.
Before
Google Tag Manager + Analytics = 73kB
After
Snippet = 1.5kB
How does this work?
This snippet sends page views directly to the Google Analytics API. There is no need to add the Google Tag Manager and Analytics libraries anymore. That not only saves bandwidth, it can also have a huge positive impact on the loading speed of your website. You should not use this if you want to use advanced features like tracking AdWords.
We use essential cookies to make this site work, and optional cookies to enhance your experience.