Learn how to embed your ChangeCrab changelog as a sidebar widget or full page on your website.
Add a changelog widget to your website or app so customers can read product updates without leaving the page. Choose a button that opens a sidebar or compact popover, or an iframe that is always visible.
For an overview of the product, see the ChangeCrab changelog widget.
| Format | What visitors see | Use it for |
|---|---|---|
| JavaScript sidebar | A button opens a panel at the right of the screen | Product navigation or a help menu |
| JavaScript dropdown / popover | A button opens a compact panel next to the launcher, adapting to available space | A header or dashboard button |
| Sidebar iframe | An always-visible compact changelog | A section within an existing page |
| Full-page iframe | An always-visible changelog page | A dedicated updates page |
projectid in the generated code. This is the changelog ID, not its display name or subdomain.Replace YOUR_CHANGELOG_ID in the examples with that value. The examples use https://changecrab.com for hosted content; you can keep this when your public changelog has a subdomain or custom domain.
Place the button where customers should find updates. Add the configuration and script after the button, preferably just before the closing </body> tag.
<button type="button" class="changebubble" data-crabtype="full">Product updates</button>
<script>
window.changecrab_config = {
projectid: "YOUR_CHANGELOG_ID",
selector: ".changebubble",
emptycolor: "rgb(208 208 208)",
activecolor: "rgb(232 23 71)",
hostedUrl: "https://changecrab.com"
};
</script>
<script src="https://changecrab.com/embed/embed.js"></script>
The selector .changebubble must match the button class. You can use a different class if you update both values. Load the widget script once per page.
Use the same setup with data-crabtype="counter" on the button:
<button type="button" class="changebubble" data-crabtype="counter">Product updates</button>
<script>
window.changecrab_config = {
projectid: "YOUR_CHANGELOG_ID",
selector: ".changebubble",
emptycolor: "rgb(208 208 208)",
activecolor: "rgb(232 23 71)",
hostedUrl: "https://changecrab.com"
};
</script>
<script src="https://changecrab.com/embed/embed.js"></script>
full opens the sidebar; counter opens the compact popover. Set the attribute on each launcher. A type setting alone is not a reliable replacement: initialization reads the first matching launcher's attribute and defaults to full if it is absent.
The unread bubble uses this browser's local history. Opening the widget resets its count. Different browsers or devices can show different counts.
An iframe does not need the widget JavaScript or a launcher. Replace the changelog ID, keep a descriptive title, and adjust the height to suit your page.
<iframe src="https://changecrab.com/sidebar/YOUR_CHANGELOG_ID" title="Product updates" width="100%" height="600" style="border:0"></iframe>
<iframe src="https://changecrab.com/embedpage/YOUR_CHANGELOG_ID" title="Product changelog" width="100%" height="800" style="border:0"></iframe>
The width="100%" follows the containing element. The height is fixed in these examples; check it with your actual posts and a narrow screen.
Mount the launcher before loading the script. Add the configuration first, then load embed/embed.js after the component has rendered. Loading it before the launcher exists leaves that element without a click handler. Avoid loading it again on every route change, which can create duplicate listeners or bubbles.
If your app replaces the launcher during navigation, keep it in a persistent navigation component or arrange initialization after the new element mounts. Test your app's route changes as well as its first load.
selector.data-crabtype, rather than changing only the configuration's type.projectid matches the generated account code, and check the changelog's visibility or password settings.badge.js provides an activity badge; it is not the script for these interactive changelog widgets.
Sidebar widget styles control whether compact content or subscribe/navigation controls are shown. These style settings are separate from the launcher's full/counter display format.