AI answer

window.aeoSettings Configuration Reference

window.aeoSettings is a global configuration object read by the AEO embed loader.
It determines which features load, how they behave, and how analytics are recorded.

Only the features explicitly enabled will be dynamically imported and initialized.


Minimal Example

<script>  window.aeoSettings = {    organization_id: 123,    organization_sub: "ai",    organization_domain: "example.com",    chat: {      enabled: true    },    site_search: {      enabled: true    },    analytics: {      enabled: true    }  };</script>

Top-Level Settings

organization_id (required)

Type: number

The internal AEO organization ID.

Used for:

  • analytics attribution
  • chat widget routing
  • site search queries

organization_sub (required for some features)

Type: string

The subdomain used for AI-accessible content and chat links.

Example:

organization_sub: "ai"

Used to construct URLs like:

https://ai.example.com/page.txt


organization_domain (required for some features)

Type: string

The primary domain for the organization.

Example:

organization_domain: "example.com"


base_url (optional)

Type: string

Overrides the default AEO backend URL.

Default:

https://app.aeo.press

Used for:

  • analytics
  • chat widget iframe
  • site search API

css_path (optional)

Type: string

URL to a custom CSS file applied inside the chat widget iframe.

Example:

css_path: "https://example.com/aeo-chat.css"


Analytics

analytics

Controls client-side analytics collection.

Structure:

analytics: {  enabled: boolean}

Fields:

  • enabled (boolean, default: true)
    When set to false, all analytics are disabled.

Analytics are only disabled when explicitly set to false.

Example:

analytics: {  enabled: false}

Chat Widget (Floating AI Chat)

chat

Enables and configures the floating AI chat widget.

Structure:

chat: {  enabled: boolean,button_text: string,button_color: string,button_text_color: string,intro_text: string}

Fields:

  • enabled (boolean, default: false)
    Loads the chat widget when true.

  • button_text (string, default: "Ask AI")
    Placeholder text in the chat trigger.

  • button_color (string, default: "#111")
    Accent color for the widget.

  • button_text_color (string, default: "#fff")
    Text color used in the trigger UI.

  • intro_text (string, default: "Hi, how can I help you today?")
    Initial assistant message shown in the chat.

Example:

chat: {  enabled: true,button_text: "Ask Acme AI",button_color: "#0047ff",button_text_color: "#ffffff",intro_text: "Hello! How can I help you with Acme today?"}

“Chat with this page in ChatGPT” Buttons

button

Injects “Chat with this page in ChatGPT” links into the page.

Structure:

button: {  enabled: boolean,subdomain: string,button_selector: string}

Fields:

  • enabled (boolean, default: false)
    Enables button injection.

  • subdomain (string, default: "ai")
    Subdomain used to build .txt page URLs.

  • button_selector (string, default: ".ai-btns")
    CSS selector for containers where links should be injected.

Example:

button: {  enabled: true,subdomain: "ai",button_selector: ".ai-buttons"}

This generates links referencing:

https://ai.example.com/current-page.txt


Site Search (Keyword + AI Semantic Search)

site_search

Enables on-site AI search and summarization.

Structure:

site_search: {  enabled: boolean,button_text: string,form_selector: string,input_selector: string,results_selector: string}

Fields:

  • enabled (boolean, default: false)
    Loads the site search module.

  • button_text (string, default: "Chat with AI")
    CTA text used in the UI.

  • form_selector (string)
    Selector for the search form container.

  • input_selector (string)
    Selector for the query input element.

  • results_selector (string)
    Selector for the container where results are rendered.

Example:

site_search: {  enabled: true,button_text: "Chat with Acme AI",form_selector: "#site-search",input_selector: "#site-search input",results_selector: "#search-results"}

Feature Flags Summary

Feature Enabled when

Analytics analytics.enabled !== false
Chat widget chat.enabled === true
ChatGPT page buttons button.enabled === true
Site search site_search.enabled === true

Only enabled features are dynamically imported.


Full Example

window.aeoSettings = {  organization_id: 42,  organization_sub: "ai",  organization_domain: "example.com",  css_path: "https://example.com/aeo-chat.css",  analytics: {    enabled: true  },  chat: {    enabled: true,    button_text: "Ask Example AI",    intro_text: "How can I help you today?"  },  button: {    enabled: true,    subdomain: "ai",    button_selector: ".ai-btns"  },  site_search: {    enabled: true,    button_text: "Chat with Example AI",    form_selector: "#search",    input_selector: "#search input",    results_selector: "#results"  }};

Notes

  • All fields are optional except organization_id
  • Feature configs are ignored unless their enabled flag is true
  • Safe to include unused sections
  • Designed for dynamic imports, caching, and future extensibility