Articles on: Install Clym

Strapi plugin

Clym CMP for Strapi


Integrate the Clym consent and accessibility widget into your Strapi-powered site. Once configured, the Clym widget is automatically injected into every page served by your front-end.



Requirements




Installation


In your Strapi project root, run:


npm install strapi-plugin-clym-cmp


Then register the plugin in your Strapi configuration. Create or edit config/plugins.ts (or config/plugins.js):


export default () => ({
'clym-cmp': {
enabled: true,
},
});


Restart your Strapi server:


npm run develop



Configuration


  1. Open the Strapi admin panel
  2. Navigate to Content Manager → Single Types → Clym Settings
  3. Enter your Widget ID in the field provided
  4. Click Save


Your Widget ID can be found in your Clym dashboard at auth.clym.io.



How It Works


The plugin registers a Koa middleware that intercepts every HTML response and injects two script tags into the <head> section before the response is sent to the browser:


<script src='https://config.clym-widget.net/v2/YOUR-WIDGET-ID.js'></script>
<script src='https://widget-next.clym-sdk.net/v2/stub.js' data-property='YOUR-WIDGET-ID'></script>



Verification


Visit any page served by your Strapi front-end and view the page source. You should see the two Clym script tags immediately after the opening <head> tag.


You can also use the test route included in the plugin:


GET /clym-test


This returns a minimal HTML page you can inspect to confirm the scripts are injected correctly.



Support



Updated on: 13/05/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!