cancel
Showing results for 
Search instead for 
Did you mean: 

eventscalendar.co embed script not working

eventscalendar.co embed script not working

Hi,

I created a new page by using the admin backend (Content->Pages). In the page editor, I added one row and an HTML code element to that page.


In that HTML code element, I have the following code:

 

<div data-events-calendar-app data-project-id="proj_id" ></div>
<script type="text/javascript" src="https://dist.eventscalendar.co/embed.js"></script>

This HTML code initailly gave a console error saying that it violates CSP regulations. That is why I added it to the csp_whitelist.xml in my custom CSP module. By doing this, the error went away and js was being fetched as you can see the following screenshot in the Network tab of developer tools.

 

RishabhTailor_0-1729154394588.png

Even after doing all this, the js is not working as expected. It should populate the upper div with the content using the proj_key. 
Any idea why is this hapenning?

PS I am new to magento.