Add a “Consent preferences” link and dispatch the optinstack:open-preferences event when it is activated:
await window.OptinStack.ready;
window.dispatchEvent(new CustomEvent('optinstack:open-preferences', { bubbles: true }));
This opens the preferences dialog for variants that support preferences. Informational banners do not have that dialog. You can also render the OptinStack Tracker declaration widget, which reflects the published inventory and can expose preferences or withdrawal controls when supported by the active banner UI.
Documentation: Open preferences and Tracker declaration widget.