diff --git a/packages/widget/src/dom/panel.ts b/packages/widget/src/dom/panel.ts index 749a2e6..fbd83fe 100644 --- a/packages/widget/src/dom/panel.ts +++ b/packages/widget/src/dom/panel.ts @@ -20,10 +20,12 @@ export interface PanelOptions { export class Panel { private el: HTMLDivElement; + private inline: boolean; messages: Messages; input: Input; constructor(root: ShadowRoot, options: PanelOptions) { + this.inline = options.inline ?? false; this.el = document.createElement('div'); this.el.className = 'cc-panel'; if (options.inline) { @@ -86,7 +88,9 @@ export class Panel { show(): void { this.el.classList.add('cc-visible'); - this.input.focus(); + if (!this.inline) { + this.input.focus(); + } } hide(): void { diff --git a/website/astro.config.mjs b/website/astro.config.mjs index b73eb01..2b82d17 100644 --- a/website/astro.config.mjs +++ b/website/astro.config.mjs @@ -7,7 +7,7 @@ import vercel from '@astrojs/vercel'; export default defineConfig({ output: 'static', adapter: vercel(), - site: 'https://chatcops.codercops.com', + site: 'https://chat.codercops.com', vite: { plugins: [tailwindcss()], }, @@ -23,6 +23,17 @@ export default defineConfig({ { icon: 'github', label: 'GitHub', href: 'https://github.com/codercops/chatcops' }, ], head: [ + { + tag: 'script', + attrs: { + src: 'https://www.googletagmanager.com/gtag/js?id=G-GLYL9J6QYX', + async: true, + }, + }, + { + tag: 'script', + content: `window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-GLYL9J6QYX');`, + }, { tag: 'script', attrs: { diff --git a/website/src/components/landing/Footer.astro b/website/src/components/landing/Footer.astro index 0f05792..edb65f7 100644 --- a/website/src/components/landing/Footer.astro +++ b/website/src/components/landing/Footer.astro @@ -60,7 +60,51 @@ const year = new Date().getFullYear(); Built by CODERCOPS +