-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'Manual start' fails when a addblocker is installed #14
Comments
I have the same problem, same error :( |
do you only use adblocker? or even an antivirus? |
I have not any adblockers or antivirus on my system. I have windows 7 and I use chrome last version. |
It's only adblocker, disabling it fixes the issue. |
We are suffering from a generic issue like this as well, and getting repeated errors in Sentry.
There's basically nothing more. Sometimes we get timeout errors. Users seem to enter our application from all directions. Most errors tend to be from Windows or Mobile (Android) devices. Browsers are mostly only Chrome v. 69 and above, but also WebView, Opera Mobile, iOS safari etc. This error might not even be related to this library since we had errors before installing ga-4-react. There seems to be some type of TypeError in
On line 495:
The script is initialized in We haven't found anything on our searches as to what might cause this issue. I tried replicating this with AdBlocker plus but Analytics works just fine. Can't pinpoint the cause. Any help would be appreciated. If this is indeed an AdBlocker issue I'd like for someone to replicate this and maybe throw in a solution as to how we can detect adblock users on our site before initializing analytics so we don't have Sentry spam us with errors. |
I reproduced also the issue with Ghostery.
|
I solved this issue in a similar way to @noofreuuuh, but on render: ga4react.initialize()
.then(() => config.GA_TRACKING_BLOCKED = false)
.catch(() => config.GA_TRACKING_BLOCKED = true)
// eslint-disable-next-line react/no-render-return-value
.finally(() => ReactDOM.render(<App />, document.getElementById('root'))); I use the config variable later to decide if I can set up the tags: const ga = useGA4React();
if (!config.GA_TRACKING_BLOCKED && !!ga) {
history.listen(location => {
ga.pageview(location.pathname);
ga.gtag('event', 'pageview', 'path');
});
} |
Like the title says, trying to access the application that uses manual start with an addblocker activated, I get the following error:
I'm also having a hard time configuring my application with the docs, for someone who's not really pro with react there's a lot of context missing in the examples.
The text was updated successfully, but these errors were encountered: