Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

react-snap: getting "processGoogleToken is not defined" error

I'm trying to populate static pages from a react app using react-snap and I keep getting this error on every page.

I don't find anything online on this error, same with "VM1516 integrator.js".

Any idea what's causing this?

processGoogleToken error

like image 706
bArmageddon Avatar asked Jul 05 '26 21:07

bArmageddon


1 Answers

If you add to your package.json file it will stop google adsense/analytics from loading. Warnings about failed network requests will show instead of the error.

  "reactSnap": {
    "skipThirdPartyRequests": true
  }

The other option is you can dynamically load the google script based on the user agent.

  if (navigator.userAgent !== "ReactSnap") {
    // some code to dynamically load a script
  }
like image 72
keza Avatar answered Jul 10 '26 10:07

keza



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!