Skip to content

Free widgets / Install guides / Netlify and static sites

Static hosting · install guide

Add an Economic Calendar Widget to a Netlify Site

Paste one snippet into your HTML and deploy. The same steps work on Netlify, Vercel, GitHub Pages and Cloudflare Pages. The widget is free with attribution, needs no API key and updates itself from official-source data.

Time 2 minutes Method HTML snippet Cost Free

What you need

  • A static site you can edit and deploy
  • The widget snippet from this page

Add the widget to Netlify and static sites

  1. Copy the snippetPick a widget and a theme below, then copy the snippet.
  2. Paste it into your pageOpen the HTML file or template for the page and paste the snippet where the widget should appear. The script tag only needs to appear once per page, however many widgets the page holds.
  3. DeployPush to the connected repository, or drag the site folder onto the Netlify deploys page. No build step, environment variable or API key is involved.
  4. Allow the widget in your security headersOnly if your site sends a Content-Security-Policy header: allow fxmacrodata.com as a script, frame and image source, as in the example below.

Code for this platform

netlify.toml headers for a site with a Content-Security-Policy

[[headers]]
  for = "/*"
  [headers.values]
    Content-Security-Policy = "default-src 'self'; script-src 'self' https://fxmacrodata.com; frame-src https://fxmacrodata.com; img-src 'self' https://fxmacrodata.com"

Tips for Netlify and static sites

  • The widget fills the width of its container, so place the element inside the column or card that should hold it.
  • Sites that render pages in the browser can add the element at any time; the script picks up widget elements added after the page loads.

If something looks wrong

What you seeWhat to do
The browser console reports a Content Security Policy violationAdd https://fxmacrodata.com to script-src, frame-src and img-src in your headers file, then redeploy.
The widget area is blankCheck that the page is served over HTTPS and that the script tag was pasted in full. Some editors only run scripts on the published page, so check the live page rather than the editor preview.
The bottom of the widget is cut offIncrease the height of the embed element. The widget needs its own height plus about 40 pixels for the attribution link beneath it.
The colours clash with the siteSet data-fxmd-theme to light, dark or transparent to match the page background.

Questions

Is the widget free on this platform?

Yes. Standard widgets on public pages are free while the FXMacroData attribution link stays visible. Customer-facing or subscriber-only products use the Commercial Redistribution add-on.

Do I need an API key or an account?

No. The snippet is everything the widget needs. An optional free publisher ID adds a stats page with views and clicks for your site.

How often does the data update?

The widget loads current data each time the page is opened, and the release ticker refreshes itself every two minutes. You never need to republish the page.

Can I change the currencies, language or time zone?

Yes. Each option is an attribute on the widget element. The options reference on the install guide lists every attribute and its values.

Other platforms

Share page X LinkedIn Email