Skip to main content

I am trying to integrate Segment with our Unbounce pages, but keep getting a CORS violation from a crossdomain ajax request:


“Access to XMLHttpRequest at ‘https://profiles.segment.com/v1/spaces/L83unNzNMo/collections/users/profiles/anonymous_id:1a3c1bf9-319b-4283-9c11-990b4d0bf6e7/external_ids’ from origin ‘https://www.brilliantdistinctionsgiveaway.com’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.”


If it was Apache I know I’d be adding the policy to htaccess, but is this something that can be fixed in Unbounce?

Hey there Pete!


Thanks for sharing your error message with us so that we have some additional insight into the CORS Violation message!


It’s always best to send in these types of questions to us through a Support Ticket at Support@Unbounce.com so that we can have a closer look at your landing page. 👍


Looking into this error message, https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSMissingAllowOrigin it seems that a certain header (that determines if the resource is allowed to load on external pages) has not been set on the server that the fonts are being hosted on.


You will likely need to touch base with your IT team or whoever had set up the ehttps://www.brilliantdistinctionsgiveaway.com] server to help add the CORS policy header to the server.


The above link has some general instructions for how to add the CORS policy header on Apache and Nginx servers, but if your font is hosted on a different server type, this website - https://enable-cors.org/ has specific instructions on how to enable CORS on a variety of server types.


Just to note, this header isn’t something you can set in Unbounce as the CORS policy header must be set in the hosting server, as a kind of permission for the font file(s) to be able to be loaded elsewhere.


I hope that this help provides a bit of clarity here but if you’re looking for more information on this just shoot us an email and we’ll be delighted to have a chat with you on the CORS policy! 🙂


Reply