Open SegmentDestinationsBot opened 6 years ago
@Macbit check if you are blocking analytics with an adblocker/anti-tracking addon or browser config. Hope it helps.
I can reproduce this issue. If you have a firewall that blocks connect.facebook.net
, you will get this error every time.
@nhsz, the bigger problem is not facebook-pixel
failing in such cases--that's understandable--but when this error happens no analytics are tracked.
Not sure if this is a problem with faceboox-pixel
or more generally with analytics.js-integrations
, but it seems like a serious problem.
Anyone have ideas for how to work around it? I don't control the intranets of visitors to my public site, but if one of them is blocking facebook in this way, I'd still like it to track analytics to other destinations that aren't blocked.
https://connect.facebook.net
. (On MacOS, I used a free trial of Charles to add this URL to the "Block list," with the Blocking Action set to "Return 403 response.")*.facebook.*
is blocked, which has to be common enough.)Expected Result: The Facebook Pixel part should fail, obviously, but you would think that other Segment Destinations would still receive events.
Actual Result: An error occurs that is fatal to all of the Segment client. No analytics events get tracked because of a failure in this one integration.
The console log shows:
Was this ever resolved? I'm still seeing this issue. Particularly with batch
calls.
Not resolved for me, @acorso522. Still appears with Analytics.js classic and v2. (You must already be using v2 if you're batching.)
@jonathanstokes , going back and forth with Segment, we did learn that the issue is related to the analytics.ready() function, where because FB doesn't load, the ready() is blocked. That said, the intent of ready() is to make sure everything is loaded before executing things and when we removed it, we ran into some additional issues. We have also identified that implementing the FB pixel through GTM through Segment or directly seems to circumvent this issues fwiw.
Migrated from #40 by @Macbit
analytics:integration:facebook-pixel error loading "Facebook Pixel" error="Error: script error "http://connect.facebook.net/en_US/fbevents.js" at HTMLScriptElement.<anonymous> (https://cdn.segment.com/analytics.js/v1/wUgzMSmoJCAqPDNtJ5BfDTzRFWDduzcP/analytics.min.js:10:3537)" +18ms