When implementing Marketing Cloud Personalization on a website, you may see CORS (Cross-Origin Resource Sharing) errors in the browser console. This issue is most commonly caused by improper loading of the Salesforce Interactions SDK, or by malformed event data sent via the Sitemap.
SDK Loading: The browser blocks access to the SDK file (evergage.min.js) when it is actively fetched via script from the CDN.
Event Dispatch (API requests): The SDK loads successfully, but the browser rejects the response from a specific API call.
evergage.min.js) is fetched directly from Personalization's CDN using JavaScript's fetch() API or XMLHttpRequest, the browser blocks the reading of the response.Cause: Personalization's CDN server is not designed to handle fetch-style cross-origin requests for script files. As a result, it does not return the required CORS response headers (such as Access-Control-Allow-Origin), causing the browser to reject the response.
Resolution: As a general rule, load the SDK using a standard <script> tag. If you need to insert it dynamically, use document.createElement('script'), set the src attribute to the SDK URL, and append it to the DOM. This approach uses the browser's script loading mechanism, which is not subject to the same-origin policy restrictions that apply to fetch() and XMLHttpRequest.
Special case (service constraints such as CMS): If the constraints of your CMS or other service force you to use fetch() to load external resources, consider setting up a reverse proxy server on your own infrastructure that adds the appropriate CORS headers before forwarding the SDK response to the browser. Note that this is a non-standard configuration and will require implementation and ongoing maintenance by your own engineering team.
Cause: In most cases, the root cause is not a network-level issue but rather a malformed Sitemap definition — such as a missing required field or an attribute with an incorrect data type. When the server rejects the request as invalid, its error response does not include CORS allow headers (e.g., Access-Control-Allow-Origin). Because the browser receives a response without these headers, it surfaces the error as a CORS violation, even though the underlying issue is a bad request.
Resolution: Open the browser's developer tools, navigate to the Network tab, and select the failing request. Inspect the request payload (which may be confirmed by Base64-decoding the parameters contained in the URL) and update your Sitemap so that the event data meets the requirements on the Personalization side.
--
If the above steps do not resolve the issue, please contact Salesforce Support with the following information:
For all cases: The URL of the page where the error occurs, and a screenshot of the browser console log.
For event dispatch errors: The full Request Payload (JSON) of the failing request, as captured in the browser's Network tab.
005317996

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.