@blotoutio/providers-blotout-consent-sdk
v1.63.3
Published
Blotout Consent Banner SDK for EdgeTag
Readme
providers-blotout-consent-sdk
This library was generated with Nx.
Link-based controls
The banner and privacy forms can be opened from plain links — no JavaScript required — by pointing an anchor at a reserved URL fragment. This works on any platform where you can set a link's URL (Shopify theme, CMS, page builder) and coexists with the JavaScript API.
| Action | Link |
| ---------------- | -------------------------------------------------------- |
| Open the banner | <a href="#blotout-open-consent">Cookie settings</a> |
| Open Do Not Sell | <a href="#blotout-do-not-sell">Do Not Sell My Info</a> |
| Open Delete form | <a href="#blotout-delete">Delete my data</a> |
Clicking the link sets the fragment, the SDK opens the matching control and then
clears the fragment from the URL (so clicking the same link again re-opens it).
Links added after the SDK loads also work, and a page deep-linked to a reserved
fragment opens the matching control once the SDK is ready. Matching is exact, so
unrelated fragments such as #blotout-delete-account are ignored. The JavaScript
API (window[Symbol.for('blotout-consent')].showDnsForm(), etc.) remains
available.
Note: on pages where the SDK does not initialize — e.g. a domain excluded by the domain filter, inside an iframe, or where the script is blocked — the link is left as an ordinary anchor and does nothing. Because Do Not Sell and Delete are compliance-mandated controls, verify the links actually open on the pages where you place them rather than assuming the markup is enough.
Building
Run nx build providers-blotout-consent-sdk to build the library.
Running unit tests
Run nx test providers-blotout-consent-sdk to execute the unit tests via Jest.
