Script attributes
Every attribute the connector reads, and what each one does.
The connector reads its configuration from its own <script>tag. Only data-site is required.
| Attribute | Required | What it does |
|---|---|---|
src | Yes | The connector itself: https://cdn.wolfigs.com/webnak.js. |
data-site | Yes | Your site key, from the dashboard. |
data-server | No | Data-plane origin. Only for a self-hosted or custom data plane; the connector defaults to Webnak's. |
data-loader | No | Loading indicator: bar, overlay, skeleton. Default is none. |
data-loader-accent | No | Accent colour for bar and overlay. |
data-loader-bg | No | Background colour for overlay. |
data-loader-text | No | Text shown by overlay. |
data-loader-logo | No | Logo URL for overlay. |
data-loader-el | No | Selector for your own loader element, which Webnak hides when content is ready. |
The same options in the npm package#
WebnakOptions mirrors the attributes, in camel case: siteKey, dataServer, src, loader, loaderAccent, loaderBg, loaderText, loaderLogo, loaderEl, nonce and target.