Adding Third Party Javascript to Cornerstone

I’m trying to add the javascript below to a Cornerstone page, but it keeps saying " Oops! Something went wrong… please try reloading the page." where the Javascript is.

<div id="engage-app" data-app="loyalty-app" data-engage-app-id="redheat_dc89ef18-7a02-4c59-bbad-359a049d6199"></div>

<script src="https://ncrengage.com/engage.js"></script>

Here is the page for reference: https://redheattavern.wpengine.com/loyalty-and-gift-cards

Let me know your thoughts on what I can do to get this third party code to work.

Hi @santosfel5,

Thank you for reaching out to us. I checked your page and there is a CORS policy error which has blocked the API you’re calling.

Access to fetch at 'https://api.ncrengage.com/graphql' from origin 'https://redheattavern.wpengine.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

You probably need to contact the API provider regarding this error, in the mean time you can follow this thread https://stackoverflow.com/questions/13421463/htaccess-access-control-allow-origin to resolve the issue.

Please note that we cannot provide support for third party plugins or scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.