# Deploying AI Agent Across Sub-Domains and Cross-Domains

> AI Agents can deploy across same or different web hosts. Sticky sessions across domains require passing the same deviceId. Admins configure deployment through Admin Settings, Channels & Workflows, and Digital channels, copy the chatbot code to each site, and provide a consistent device ID using…

Source: https://help.dialpadstaging.com/articles/deploying-ai-agent-across-sub-domains-and-cross-domains  
Category: AI Agent  
Updated: 2026-10-09

AI Agents can deploy across same or different web hosts. Sticky sessions across domains require passing the same deviceId. Admins configure deployment through Admin Settings, Channels & Workflows, and Digital channels, copy the chatbot code to each site, and provide a consistent device ID using user identifiers or fingerprinting.

Deploying AI Agents across multiple web domains may require additional configuration depending on your setup.

There are three common deployment scenarios:

- Same host: No configuration is needed if all chatbots are deployed on the same host. Follow the instructions in [this article.](https://help.dialpadstaging.com/articles/create-an-ai-agent)
- Different hosts, no sticky sessions: If sticky sessions aren’t required, no additional setup is necessary. Follow the instructions in [this article.](https://help.dialpadstaging.com/articles/create-an-ai-agent)
- Different hosts, sticky sessions enabled: To maintain sticky sessions across domains, you’ll need to pass the same deviceId across all hosts.

Let's dive into the details.

> **Who can use this**
>
> Dialpad Admins with an AI Agent can deploy their chatbot across sub-domains and cross-domains.

## Deploy AI Agent on different hosts with sticky sessions

To deploy your AI Agent on different hosts, with sticky sessions enabled, go to the Dialpad Admin Portal.

> **Note**
>
> In this example, you want to deploy a chatbot on the following two web pages: www.acme.com/products and www.customer-care.acme.com.

1. Select **Admin Settings**
2. Select **Channels & Workflows**
3. Select **Digital channels**

   ![ai-agent-web-chat(1).png](https://help.dialpadstaging.com/media/c87a8234-ea21-48d5-a9fe-61163a2944d0)
4. Select the AI Agent you want to deploy
5. Select **Deploy**
6. Select **Copy code**

   ![ai-agent-copy-code(1).png](https://help.dialpadstaging.com/media/97b80566-6ed9-4b5e-8681-a4b3e42e0d7a)
7. Paste the code snippet from Step #6 into the HTML source of www.acme.com/products and www.customer-care.acme.com

   ```
   <html>
     <head>
       <!-- Other meta tags and scripts for the page -->
     </head>
     <body>
       <!-- Other markup for the page -->
       <div
     id="dx_chatbot_fab_wrapper_id" 
     style="background-color:;border-radius:50%;box-sizing:border-box;display:flex;height:56px;overflow:hidden;padding:12px;width:56px;position:absolute;bottom:16px;right:16px;z-index:123;">
     <img 
       data-dxchannelid="717f1b6eb10e431883d1e8e7c3dd4174"
       data-dxprovemail="5260333583433728@aerolabs.io"
       id="dx_chatbot_fab_id"
       src="https://us-east.dx.dialpad.comundefined"
       style="clip-path:circle(50%);object-fit:contain;height:auto;width:100%;"
     />
   </div>
   <script>window.dxe = { "server": "https://us-east.dx.dialpad.com" };</script>
   <script async type="module" src="https://us-east.dx.dialpad.com/dxclient/dist/dialpad-chatbot.es.js"></script>
     </body>
   </html>
   ```
8. You can choose to pass different types of values forDEVICE_ID. Our recommendations are:

   **Option 1:** Passing the end user’s email, username, userid, or similar types of unique IDs as the DEVICE_ID.

   This option may not be available for guest users.

   **Option 2:** Using off-the-shelf fingerprinting JavaScript libraries to generate and pass unique IDs to the chatbot. A fingerprinting JavaScript utility creates a unique ID using the end user’s hardware information via browser APIs. The following code snippet can be used as a basic fingerprinting utility:

   ```
   function fingerprint() {
     const features = []
     features.push(
       {
         key: "available_resolution",
         value: [screen.availHeight, screen.availWidth],
       },
       { key: "cookie_enabled", value: navigator.cookieEnabled },
       { key: "do_not_track", value: navigator.doNotTrack },
       { key: "hardware_concurrency", value: navigator.hardwareConcurrency },
       { key: "indexed_db", value: !window.indexedDB },
       { key: "language", value: navigator.language },
       { key: "local_storage", value: !window.localStorage },
       { key: "navigator_oscpu", value: navigator.oscpu },
       { key: "navigator_platform", value: navigator.platform },
       { key: "open_database", value: !window.openDatabase },
       { key: "pixel_ratio", value: window.devicePixelRatio },
       { key: "resolution", value: [screen.width, screen.height] },
       { key: "session_storage", value: !window.sessionStorage },
       { key: "timezone_offset", value: new Date().getTimezoneOffset() },
       { key: "touch_support", value: navigator.maxTouchPoints },
       { key: "user_agent", value: navigator.userAgent },
     )
     for (let i = 0; i < navigator.plugins.length; i++) {
       features.push({
         key: `navigator_plugin_${i}`,
         value: navigator.plugins[i].name,
       })
     }
     let fingerprint = ""
     for (const feature of features) {
       if (feature.value) {
         fingerprint += feature.value.toString().toLowerCase().slice(0, 2)
       }
     }
     fingerprint += fingerprint.length
     fingerprint += navigator.plugins.length
     return fingerprint
   }
   ```

Combining the code snippets from Step #7 and #8, our deployment source in www.acme.com/products and www.customer-care.acme.com would read as:

```
<html>
  <head>
    <!-- Other meta tags and scripts for the page -->
  <script>
    function fingerprint() {
      const features = [];
      features.push(
        {
          key: "available_resolution",
          value: [screen.availHeight, screen.availWidth],
        },
        { key: "cookie_enabled", value: navigator.cookieEnabled },
        { key: "do_not_track", value: navigator.doNotTrack },
        { key: "hardware_concurrency", value: navigator.hardwareConcurrency },
        { key: "indexed_db", value: !window.indexedDB },
        { key: "language", value: navigator.language },
        { key: "local_storage", value: !window.localStorage },
        { key: "navigator_oscpu", value: navigator.oscpu },
        { key: "navigator_platform", value: navigator.platform },
        { key: "open_database", value: !window.openDatabase },
        { key: "pixel_ratio", value: window.devicePixelRatio },
        { key: "resolution", value: [screen.width, screen.height] },
        { key: "session_storage", value: !window.sessionStorage },
        { key: "timezone_offset", value: new Date().getTimezoneOffset() },
        { key: "touch_support", value: navigator.maxTouchPoints },
        { key: "user_agent", value: navigator.userAgent },
      );
      for (let i = 0; i < navigator.plugins.length; i++) {
        features.push({
          key: `navigator_plugin_${i}`,
          value: navigator.plugins[i].name,
        });
      }
      let fingerprint = ""
      for (const feature of features) {
        if (feature.value) {
          fingerprint += feature.value.toString().toLowerCase().slice(0, 2);
        }
      }
      fingerprint += fingerprint.length;
      fingerprint += navigator.plugins.length;
      return fingerprint;
    }
  </script>
  </head>
  <body>
    <!-- Other markup for the page -->
    <div
  id="dx_chatbot_fab_wrapper_id" 
  style="background-color:;border-radius:50%;box-sizing:border-box;display:flex;height:56px;overflow:hidden;padding:12px;width:56px;position:absolute;bottom:16px;right:16px;z-index:123;">
  <img 
    data-dxchannelid="717f1b6eb10e431883d1e8e7c3dd4174"
    data-dxprovemail="5260333583433728@aerolabs.io"
    id="dx_chatbot_fab_id"
    src="https://us-east.dx.dialpad.comundefined"
    style="clip-path:circle(50%);object-fit:contain;height:auto;width:100%;"
  />
</div>
    <script>
      const fabElement = document.getElementById("dx_chatbot_fab_id")
      if (fabElement) {
        fabElement.dataset.dxdeviceid = `${fingerprint()}`;
      }
      window.dxe = { "server": "https://lighthouse.dx.dialpad.com" };</script>
    <script async type="module" src="https://lighthouse.dx.dialpad.com/dxclient/dist/dialpad-chatbot.es.js"></script>
  </body>
</html>
```

> **Note**
>
> The value of data-dxdeviceid="DEVICE_ID" controls the persistence across sub-domains and cross-domains.
>
> In this example, we query the image element of the chat button and dynamically set a new data attribute.

## Related

- [AI Agent Analytics](https://help.dialpadstaging.com/articles/ai-agent-analytics)
- [Create an Agentic AI Agent](https://help.dialpadstaging.com/articles/create-an-agentic-ai-agent)
- [Create an AI Agent](https://help.dialpadstaging.com/articles/create-an-ai-agent)
- [ServiceNow API Keys for Agentic AI Agents](https://help.dialpadstaging.com/articles/servicenow-api-keys-for-agentic-ai-agents)
