Using the widget

The widget SDK can be used to attach a changelog widget to an element, like a button. When the user clicks that element, a changelog-widget will pop up.

Perquisites

Before getting started you need an integration key and a project id, which you can get by:

  1. Opening the dashboard
  2. Selecting a workspace and a project
  3. Clicking on integration in the sidebar on the left
  4. Copy the ID from the overview panel
  5. Switch to the integration keys panel
  6. Create a new integration key
  7. Copy the integration key

Using the SDK

// index.html
<html>
  <head>
  </head>
  <body>
    ...
    <button class="changelog">Changelog</button>
    ...

    <!-- Client sdk -->
    <script src="https://unpkg.com/changelog-widget/dist/index.umd.js"></script>

    <!-- Your javascript file -->
    <script async defer src="/script.js"></script>
  </body>
</html>

In your html-file, you should include our client SDK and your js-file.

The html-file must also include an element that the widget can be mounted to. In this example, we are using a button, but it could be any other element.

// script.js
new widget({
  // The ID of your project
  id: 'Y1k_C5lZ', 

  // The integration key of your project
  key: 'IK-X2zvTYjp-NCg-3q2Rj',

  // The element you want to attach the widget to
  element: document.querySelector('.changelog') 
});

Result

A webbrowser containing a button and a changelog widget

Related

Using the sidebar.

How to display a changelog-sidebar on your own website.