rudder-sdk-js
rudder-sdk-js copied to clipboard
BUG : ublock blocking all paths with /beacon/
Describe the bug I'm using rudderstack JavaScript API for our web app. In testing analytics, I installed ublock as a Chrome extention. ublocks seems to be blocking all paths with the "/beacon/" in it. None of the rudderstack events go through. I have set up our custom domain. Without ublock, rudderstack events are sent fine. But with ublock enabled, the http requests are blocked.
To Reproduce Steps to reproduce the behavior:
- Install ublock origin lite Chrome extension
- Open dev console, open the network tab
- Go to any site using rudderstack analytics
- Observe the console logs. Http requests with url like .../beacon/.../batch?writeKey=... are blocked
Expected behavior events are not blocked
Screenshots If applicable, add screenshots to help explain your problem.
Additional Information (please complete the following information):
- SDK installation type: NPM
- SDK CDN URL: (if applicable)
- SDK version: (for NPM installation)
- Node version: (if applicable)
- NPM version: 3.1.0
- TypeScript version: (if applicable)
- Webpage URL: (where the SDK is installed, if applicable)
- Share the event payload: (if applicable)
- Integration that has the issue: (if applicable)
- Framework and version(e.g: Next.js, React, Vue): react, vite
- Bundling toolset (e.g: Webpack, Rollup): (if applicable)
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
Thanks for opening this issue! We'll get back to you shortly. If it is a bug, please make sure to add steps to reproduce the issue.
Hello,
I'm facing the same/similar issue. It seems that, despite having a custom domain configured in Rudderstack, it still tries to download some script from Rudderlabs CDN, which is blocked by uBlock and prevents track calls from going through.
Hello,
I'm facing the same/similar issue. It seems that, despite having a custom domain configured in Rudderstack, it still tries to download some script from Rudderlabs CDN, which is blocked by uBlock and prevents
trackcalls from going through.![]()
You can make this work by setting this option to point to your custom domain:
rudder.load(writeKey, dataPlaneUrl, {
...
pluginsSDKBaseURL,
})
Hello @tak-hntlabs Thanks for raising it to us. We're investigating it.
One potential solution is to support an obfuscated alias for the beacon endpoint to make it harder for adblockers to block. We'll make sure to keep you posted.
Additionally, thanks for clarifying the load API option above.
@ricardocosta, if you have any device mode destinations connected to your source, you should also exercise the destSDKBaseURL option.
Please let us know if you need any help.