History

docs: tighten setup prompt + measure the copy button

Prompt (marketing + docs): note that MCP clients load servers at startup, so the user likely needs to restart their client or open a new chat before Executor tools appear, and recommend Executor Cloud as the fastest path. Marketing: complete the scaffolded PostHog wiring (gated on PUBLIC_POSTHOG_KEY, first-party proxied, autocapture and pageviews off) and capture a marketing_setup_prompt_copied event when the prompt is copied.

Rhys Sullivan committed 4 months ago

Commit 164792d1 parent 9ddf1ff3 files · +43 −6Browse files

Unified · Split

3 files
  1. apps/docs/index.mdx +3 −3
  2. apps/marketing/src/layouts/Layout.astro +26 −0
  3. apps/marketing/src/pages/index.astro +14 −3
apps/docs/index.mdx+3−3
@@ -28,7 +28,7 @@ Help me set up Executor and get my first connection working. · 27 unmodified lines
2828
2929 Executor is an open source integration layer for AI agents: one place to configure every integration (MCP servers, OpenAPI specs, GraphQL APIs) and connect to them over MCP.
3030
31−Start by helping me pick the right form to run it in. Chat with me about it rather than jumping straight to a yes/no question, and recommend one. All forms expose the same functionality, just packaged differently:
31+Start by helping me pick the right form to run it in. Chat with me about it rather than jumping straight to a yes/no question, and recommend one. If I just want the fastest path, suggest Executor Cloud (free tier, nothing to install). All forms expose the same functionality, just packaged differently:
3232
3333 Local (everything stays on my machine):
3434 - Desktop app: a native app for Mac, Windows, and Linux. Best for a regular desktop environment.
@@ -50,8 +50,8 @@ Terms you'll come across: · 15 unmodified lines
5050
5151 Once you know which form I want:
5252 1. Walk me through installing it.
53−2. Connect Executor to you over MCP.
54−3. Help me add my first integration and get one tool working end to end.
53+2. Connect Executor to you over MCP. Most MCP clients only load servers at startup, so after adding it I may need to restart the client or open a new chat before the Executor tools appear. Tell me if that's needed and wait for me to do it before continuing.
54+3. Once the tools are available, help me add my first integration and get one tool working end to end.
5555
5656 Docs: https://executor.sh/docs
5757 Source (and the place to start if something breaks): https://github.com/RhysSullivan/executor
apps/marketing/src/layouts/Layout.astro+26−0
@@ -45,5 +45,31 @@ const canonical = new URL(Astro.url.pathname, Astro.site ?? Astro.url).toString( · 44 unmodified lines
4545 </head>
4646 <body class="antialiased">
4747 <slot />
48+ <script>
49+ // Gated PostHog init. Runs only when PUBLIC_POSTHOG_KEY is set in the
50+ // deploy env, so it's a no-op in dev / unconfigured builds (and the SDK
51+ // isn't even shipped, thanks to the dynamic import). Events are proxied
52+ // first-party through src/middleware.ts to survive adblockers.
53+ // autocapture and pageviews are off on purpose: we only send the explicit
54+ // events the page fires (e.g. the "Set up with your agent" copy). Flip
55+ // capture_pageview on if you want a denominator for conversion.
56+ const phKey = import.meta.env.PUBLIC_POSTHOG_KEY;
57+ if (phKey) {
58+ const phPath = (import.meta.env.PUBLIC_ANALYTICS_PATH ?? "a").replace(
59+ /^\/+|\/+$/g,
60+ "",
61+ );
62+ void import("posthog-js").then(({ default: posthog }) => {
63+ posthog.init(phKey, {
64+ api_host: `${window.location.origin}/api/${phPath}`,
65+ ui_host: import.meta.env.PUBLIC_POSTHOG_HOST ?? "https://us.posthog.com",
66+ autocapture: false,
67+ capture_pageview: false,
68+ persistence: "localStorage",
69+ });
70+ Object.assign(window, { posthog });
71+ });
72+ }
73+ </script>
4874 </body>
4975 </html>
apps/marketing/src/pages/index.astro+14−3
@@ -12,7 +12,7 @@ const setupPrompt = `Help me set up Executor and get my first connection working · 11 unmodified lines
1212
1313 Executor is an open source integration layer for AI agents: one place to configure every integration (MCP servers, OpenAPI specs, GraphQL APIs) and connect to them over MCP.
1414
15−Start by helping me pick the right form to run it in. Chat with me about it rather than jumping straight to a yes/no question, and recommend one. All forms expose the same functionality, just packaged differently:
15+Start by helping me pick the right form to run it in. Chat with me about it rather than jumping straight to a yes/no question, and recommend one. If I just want the fastest path, suggest Executor Cloud (free tier, nothing to install). All forms expose the same functionality, just packaged differently:
1616
1717 Local (everything stays on my machine):
1818 - Desktop app: a native app for Mac, Windows, and Linux. Best for a regular desktop environment.
@@ -34,8 +34,8 @@ Terms you'll come across: · 15 unmodified lines
3434
3535 Once you know which form I want:
3636 1. Walk me through installing it.
37−2. Connect Executor to you over MCP.
38−3. Help me add my first integration and get one tool working end to end.
37+2. Connect Executor to you over MCP. Most MCP clients only load servers at startup, so after adding it I may need to restart the client or open a new chat before the Executor tools appear. Tell me if that's needed and wait for me to do it before continuing.
38+3. Once the tools are available, help me add my first integration and get one tool working end to end.
3939
4040 Docs: https://executor.sh/docs
4141 Source (and the place to start if something breaks): https://github.com/RhysSullivan/executor`;
@@ -204,6 +204,7 @@ Source (and the place to start if something breaks): https://github.com/RhysSull · 162 unmodified lines
204204 type="button"
205205 class="btn-secondary copy-btn"
206206 data-copy={setupPrompt}
207+ data-event="marketing_setup_prompt_copied"
207208 >
208209 Set up with your agent
209210 <span class="copy-icons" aria-hidden="true">
@@ -439,6 +440,16 @@ Source (and the place to start if something breaks): https://github.com/RhysSull · 229 unmodified lines
439440 try {
440441 await navigator.clipboard.writeText(text);
441442 btn.dataset.copied = "true";
443+ const event = btn.dataset.event;
444+ if (event) {
445+ (
446+ window as unknown as {
447+ posthog?: {
448+ capture: (e: string, p?: Record<string, unknown>) => void;
449+ };
450+ }
451+ ).posthog?.capture(event, { surface: "marketing_hero" });
452+ }
442453 } catch {
443454 btn.dataset.copied = "false";
444455 }