Skip to content

[facebook-pixel] error loading "Facebook Pixel" error="Error: script error "http://connect.facebook.net/en_US/fbevents.js" #54

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

Open
SegmentDestinationsBot opened this issue Sep 6, 2018 · 6 comments

Comments

@SegmentDestinationsBot
Copy link
Contributor

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

@nhsz
Copy link

nhsz commented Jan 15, 2019

@Macbit check if you are blocking analytics with an adblocker/anti-tracking addon or browser config. Hope it helps.

@jonathanstokes
Copy link

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.

@jonathanstokes
Copy link

Steps to Reproduce

  1. Have Segment set up with a Facebook Pixel integration.
  2. From the client/browser machine, block access to 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.")
  3. Connect to the site using the partially blocked browser. (This simulates connecting from any corporate proxy where *.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:
image

@acorso522
Copy link

Was this ever resolved? I'm still seeing this issue. Particularly with batch calls.

@jonathanstokes
Copy link

Not resolved for me, @acorso522. Still appears with Analytics.js classic and v2. (You must already be using v2 if you're batching.)

@acorso522
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants