Skip to main content
Needle AI

Widget V1

2 min read

The Needle Widget V1 offers a simple experience by providing a single answer to the questions.

This is a legacy widget and you should use the Widget V2 when possible.

Quickstart

1. Generate Widget Code

  1. Navigate to your Needle dashboard
  2. Go to Collections ➔ [Your Collection] ➔ Widget
  3. Enter your website's domain
    • For example, if your page is https://www.example.com/home, you must enter www.example.com
    • Once you enter the domain, widget can be used on all pages of your website
  4. The system will generate your unique widget code
  5. Copy the widget code
Generated Needle web widget code

Generated Needle web widget code.

2. Add Widget to Your Website

Add the following to your website:

  1. Insert the script tag in your HTML <head> section
  2. Place the widget web component in your <body> where you want it to appear

That's all you need to get started! Now you should be able to see and use the widget on your website.

Needle web widget answer

Needle web widget in action.

Troubleshooting

If you encounter an Unauthorized Error, verify the following:

  • You entered the domain of your website in Needle widget configuration correctly
    • For example, if your page is https://www.example.com/home, you must enter www.example.com
  • Collection ID is correct, it must start with clt_
  • Client key is correct, it must start with clk_
    • Note that client key is different from API key
  • Widget code is properly added to your website
    • Right click on the page
    • Click on Inspect
    • Locate the widget code in the page source and verify

Need Help?

You can contact us anytime by discord or email. We are happy to help!