---
title: How to add the Javascript widget to your page
slug: how-to-add-the-javascript-widget-to-your-page
docTags: 
createdAt: 2023-06-27T22:52:24.585Z
---



## Step 1. From your dashboard, go to "Apps & Plugins"

::Image[]{src="https://api.archbee.com/api/optimize/yGUejq6E8IJ_sYX6JSjSr/xzdbkyml7BcgojL0t04cN_step-1-click-apps-and-plugins-highlighted.png" size="34" width="504" height="846" position="center" darkWidth="504" darkHeight="846" showCaption="false"}




## Step 2. On the JavaScript widget card, click Install JavaScript widget

![](https://api.archbee.com/api/optimize/yGUejq6E8IJ_sYX6JSjSr/e4G3nf9DC-qPGmNxTi-nM_step-2-click-install-javascript-widget-highlighted.png)




## Step 3. Whitelist your domain and copy the code

The embed code appears only after you add at least one domain to the whitelist.

****


Under **Whitelist your domains**, enter your domain with its protocol (for example, https\://example.com) and click **Add domain**. The widget works only on the domains you whitelist.

![](https://api.archbee.com/api/optimize/yGUejq6E8IJ_sYX6JSjSr/-G7Y6aVRc57HzI2tOdgH__step-3-whitelist-your-domains.png)




Now, click the copy icon to copy the **HTML** embed code. It already contains your public key.

![](https://api.archbee.com/api/optimize/yGUejq6E8IJ_sYX6JSjSr/BnYTsw60g3aK5U-4KATTh_step-3-copy-the-html-embed-code-highlighted.png)




## Step 4. Paste the script into your HTML file. 

Remember that, in order for the widget to work correctly, you must have an input with at least one attribute with a value of "email" on the page where the widget is installed. The widget detects this input automatically.

![](https://api.archbee.com/api/optimize/yGUejq6E8IJ_sYX6JSjSr/eoQzOXitrDAbH3a--c2oR_6.png)

### And, you're done!

