Installing the Widget Directly in Website HTML

Last updated: September 29, 2026

Paste the Docket widget script into your website's own HTML when your team adds scripts directly to the site template, CMS theme, or page layout.

If your team manages third-party scripts in Google Tag Manager, use Installing the Widget with Google Tag Manager instead.

What do I need before I paste the script?

You need edit access to the website template and the script copied from the agent's Deploy tab.

  • You can edit the website template or page layout.

  • You have copied the Docket script from the agent's Deploy tab.

  • The target domain has been reviewed in Whitelist Domains.

  • You know which pages should load the widget.

How do I add the Docket widget script to my website HTML?

Copy the script from the agent's Deploy tab, paste it near the end of the page body, then publish the website change.

  1. Log in to app.docketai.com.

  2. Click Marketing Agent Configuration in the left sidebar.

  3. Select the agent.

  4. Open the Deploy tab.

  5. In Add widget to your domain or page, click Copy Script.

Deploy tab with the Copy Script and Email to Web Admin buttons marked above the generated widget script

The script is tied to the selected agent. Do not copy a script from a different agent.

If someone else edits the website, click Email to Web Admin (callout 2) instead of copying the script yourself.

Where in the page should the script go?

Paste the Docket script near the end of the page body, before the closing </body> tag.

This lets the page content load while still making the widget available to visitors.

If your CMS has separate fields for header and body/footer scripts, use the body or footer script location unless your implementation owner instructs otherwise.

Common places to find the right template:

  • The global website layout.

  • A shared footer or body template.

  • A CMS custom-code area.

  • The page template used by your campaign or product pages.

Publish the website change

Publish the website update using your normal deployment process.

If your site uses a staging environment, test there first, then repeat the deployment for production.

Which hosts do I need to allowlist so the script can load?

Allow docketai.com and its subdomains, plus d33t2173eag6fx.cloudfront.net, anywhere your site blocks third-party scripts or network calls.

The subdomains cover cdn.docketai.com, app.docketai.com, and aiseller.app.docketai.com.

The host in the generated script differs by agent vintage, so read the host from your own agent's script on the Deploy tab and confirm that one is allowed. Treat the two hosts above as the current list rather than a permanent one.

Check every place that can block a script or a request:

  • Your consent manager's script rules.

  • The script-src directive in your Content Security Policy.

  • The connect-src directive in your Content Security Policy. Both directives need the hosts, not just script-src.

  • Any firewall, proxy, DNS, or content-blocking rule.

A web application firewall's "Allowlisted URLs" parameter table is the wrong screen for this. That setting exempts a parameter on your own URLs and cannot allow an external script.

How do I check whether Docket detected the script on my domain?

Each domain row under Whitelist Domains on the Widget tab shows whether Docket has detected the script on that domain.

When Docket has not found it, the row reads "We couldn't find the DocketAI Script on your domain".

After you publish the script, use the rescan control next to the Add Domain field to check the domain again.

A domain that is not whitelisted returns an HTTP 403. For adding and managing the list, see Whitelisting Domains for Your Marketing Agent Widget.

Why doesn't the widget open by itself after I install the script?

If the domain's Show Widget on setting is On Click (Function Call), the widget will not open by itself and your site must call a JavaScript function to open it.

A correct install looks like a failed one in that case. The script loads, and nothing appears on the page until the function runs.

Show Widget on sits under Widget Behaviour on the Widget tab. The other two choices are All Pages and Selected Pages.

For the function your site needs to call, see Setting up OnClick Trigger for the widget.

How do I confirm the direct install worked?

Open the live page URL and confirm the Docket script is in the rendered source, the widget behaves as configured, and the browser console reports no blocked resources.

  1. Open the final page URL in a private browser window.

  2. Confirm the page is on a whitelisted domain.

  3. View the rendered page source and confirm the Docket script appears once.

  4. Confirm the widget loads the way Show Widget on is configured for that domain.

  5. Open the widget and complete a short text interaction.

  6. Check the browser console for blocked resources or initialization errors.

  7. Repeat on a page where the widget should not appear.

For the wider check across CTAs, meetings, and handoff, see How to Validate a Widget Deployment.

What should I check if the widget still does not appear?

Check that the script reached the live page, that the domain is whitelisted, that no allowlist host is blocked, and that the agent is Active.

Issue

What to Check

Widget does not appear

Confirm the script was published to the live page and the domain is whitelisted.

Script is in the page but nothing loads

Check the allowlist hosts above, then look for blocked requests in the browser console.

Widget appears on staging but not production

Confirm production also has the script and the production domain is whitelisted.

Nothing happens until a visitor clicks something

Show Widget on may be set to On Click (Function Call) for that domain.

Wrong agent appears

Confirm the script was copied from the intended agent's Deploy tab.

Visitors get an HTTP 403

Review IP Access Rules and the whitelisted domains.

Frequently asked questions

Does the agent need to be Active for the widget to appear?

Yes. A Draft agent is not live on the website, so the widget will not load even when the script is installed correctly. See Understanding Active and Draft Agents.

Do I still need to whitelist the domain after installing the script?

Yes. The widget only works on whitelisted domains, and a domain that is not on the list returns an HTTP 403. Add it under Whitelist Domains on the Widget tab.

Is the script host the same for every agent?

No. Older agents load the widget from d33t2173eag6fx.cloudfront.net and newer agents load it from cdn.docketai.com. Both are live, so read the host from your own agent's script before you send it to a security team.

Can I install the script through Google Tag Manager instead?

Yes, and you should use one path rather than both. See Installing the Widget with Google Tag Manager if your team manages third-party scripts there.

Why are some visitors blocked from the widget?

A visitor matched by an IP access rule gets an HTTP 403. A rule always restricts access and there is no allow option, so never enter your own office IP. See Setting Up IP Access Rules for Agent Security.

What if someone else maintains the website?

Click Email to Web Admin in Add widget to your domain or page on the Deploy tab. See Sending Deployment Instructions to a Web Admin.

Related articles