--- title: "Deploying AI Agent Across Sub-Domains and Cross-Domains" slug: "deploying-ai-chatbot-across-sub-domains-and-cross-domains" description: "Deploy AI chatbots with sticky sessions. Pass deviceId across hosts/domains to maintain user sessions for consistent experiences." updated: 2026-08-18T13:46:46Z published: 2026-08-18T13:46:46Z canonical: "help.dialpad.com/deploying-ai-chatbot-across-sub-domains-and-cross-domains" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.dialpad.com/llms.txt > Use this file to discover all available pages before exploring further. # Deploying AI Agent Across Sub-Domains and Cross-Domains 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.](/v1/docs/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.](/v1/docs/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. > [!NOTE] > 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] > 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** ![Overview of digital channels configuration with various agent options listed.](https://cdn.us.document360.io/0f28ad44-2863-4372-a27e-c6728808d742/Images/Documentation/ai-agent-web-chat(1).png) 4. Select the AI Agent you want to deploy 5. Select **Deploy** 6. Select **Copy code** ![Instructions for deploying the Agentic Support Agent on a web page with code snippet.](https://cdn.us.document360.io/0f28ad44-2863-4372-a27e-c6728808d742/Images/Documentation/ai-agent-copy-code(1).png) 7. Paste the code snippet from Step #6 into the HTML source of www.acme.com/products and www.customer-care.acme.com ```xml                  
 
  ``` 8. You can choose to pass different types of values forDEVICE_ID. Our recommendations are: ```javascript 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 } ``` 1. Option 1: Passing the end user’s email, username, userid, or similar types of unique IDs as the DEVICE_ID. 1. This option may not be available for guest users. 2. 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: 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: ```xml                    
 
          ``` > [!NOTE] > Note > > The value of data-dxdeviceid="DEVICE_ID" controls the persistence across sub-domains and cross-domains. > > In this example, we are querying the `image` element of the chat button and dynamically setting a new data attribute. ## Related - [AI Agent](/getting-started-with-ai-agent.md) - [AI Agent Analytics](/ai-agent-analytics.md)