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.

AttributeRequiredWhat it does
srcYesThe connector itself: https://cdn.wolfigs.com/webnak.js.
data-siteYesYour site key, from the dashboard.
data-serverNoData-plane origin. Only for a self-hosted or custom data plane; the connector defaults to Webnak's.
data-loaderNoLoading indicator: bar, overlay, skeleton. Default is none.
data-loader-accentNoAccent colour for bar and overlay.
data-loader-bgNoBackground colour for overlay.
data-loader-textNoText shown by overlay.
data-loader-logoNoLogo URL for overlay.
data-loader-elNoSelector 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.