JavaScript embed: quick start

Add the AccessYes accessibility widget to any website in under five minutes using the JavaScript embed. Works with Webflow, Shopify, Wix, Squarespace, and any custom HTML site.

Updated

In this article: How to get your widget ID, add the embed script to your site, and verify the widget is working — in under five minutes.

The JavaScript embed lets you add the AccessYes accessibility widget to any website, not just WordPress. It works on Webflow, Shopify, Wix, Squarespace, custom HTML sites, and any platform that lets you add a <script> tag.


Step 1: Get your widget ID

Every widget install is identified by a unique widget ID. To get yours:

  1. Go to accessyes.com/get-your-script.
  2. Enter your website URL and configure your preferences (position, language, accessibility statement).
  3. Click Copy script. Your widget ID is embedded in the script tag automatically.

Your widget ID looks like this: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx


Step 2: Add the script to your site

Paste the following script into the <head> or just before the closing </body> tag of every page where you want the widget to appear. Replace YOUR_WIDGET_ID with your actual ID.

<script>
(function(w,d,s,u){
  w._cyA11yConfig = {
    iconId: 'default',
    position: { desktop: 'bottom-right', mobile: 'bottom-right' },
    language: { default: 'en', selected: [] },
    modules: { statement: { enabled: false, url: '' } }
  };
  var js = d.createElement(s), fjs = d.getElementsByTagName(s)[0];
  js.src = u;
  js.async = true;
  fjs.parentNode.insertBefore(js, fjs);
})(window, document, 'script',
   'https://cdn-cookieyes.com/widgets/accessibility.js?id=YOUR_WIDGET_ID');
</script>

The widget loads asynchronously and does not block page rendering.

Tip

Placing the script in the <head> means the widget appears earlier in the page load. Placing it before </body> slightly delays appearance but avoids any risk of blocking the critical rendering path. Either position works correctly.


Step 3: Verify it is working

After adding the script, open your site in a browser. You should see the accessibility button (a person icon) in the bottom-right corner of the page. Clicking it opens the widget panel.

If the button does not appear:

  • Check that your widget ID is correct and matches the one on your AccessYes account.
  • Check your browser console for errors — a 404 on the CDN URL usually means the widget ID is wrong or has not been activated yet.
  • Make sure the script is not being blocked by a Content Security Policy. If it is, add cdn-cookieyes.com to your script-src directive.

Configuring the widget

The window._cyA11yConfig object controls the widget’s appearance and behaviour. The example above uses the defaults. To customise position, language, colours, and features, see the Configuration reference.


Platform-specific guides

For step-by-step instructions tailored to your platform: