Integration

How to add the Plaudit widget to your website

Adding the Plaudit widget to webpages with academic works takes two steps:

  1. Obtain an integration token
  2. Insert an HTML snippet to the page

Obtain an integration token

To make sure Plaudit can handle the load, we are gradually rolling out integrations. Thus, at this point in time it is required to contact us if you are interested in integrating the Plaudit widget into your website. When your integration is approved, we will ask you for the host names you want to display the widget at (e.g. example.com and dev.example.com). You will then receive a token that can be used to integrate the widget at thost host names.

Insert the integration snippet

To add the snippet to a page, insert the following HTML:

<script async src="https://plaudit.pub/embed/endorsements.js"
        data-embedder-id="integrationToken"
></script>

Make sure to replace integrationToken with the integration token you obtained in the previous step.

The widget will be placed in the DOM in front of this <script> tag. It will automatically detect which work the page is about, provided that its DOI is listed in the page's metadata in one of the formats supported by get-dois. (This should cover most commonly-used formats.)