The safest way to add a script to every WordPress page is through a header/footer plugin — this survives theme updates. Alternatively, edit your theme’s footer.php directly, but note that changes will be lost when the theme is updated.
Editing theme files directly (the non-plugin approach) means your changes will be overwritten when the theme updates. Use a child theme or the plugin approach to avoid losing the snippet.
Get your keys — your knowledge base ID and public client key (bq_pk_...) are in the BeforeQuery dashboard under Knowledge Base → Integration. Add your WordPress site’s domain to the key’s origin allowlist.
For all widget configuration options, see Widget reference.