Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
feat(docs): attribute dashboard sign-ups with UTM params on all docs links
Sarah Simionescuc901397bc567
diff --git a/docs/AGENTS.md b/docs/AGENTS.mdindex c3e06599e..825e2d315 100644--- a/docs/AGENTS.md+++ b/docs/AGENTS.md@@ -39,3 +39,4 @@ bun run generate:api-index- API reference pages and toolkit/meta-tool data are generated. Do not hand-edit generated data unless the local generator owns it.- Changelog entries require `title` and `date` frontmatter, and dates use `YYYY-MM-DD`.- Prefer cURL for API interactions because docs are consumed by humans and AI crawlers.+- Links to `dashboard.composio.dev` must carry `utm_source=docs`, `utm_medium`, and `utm_campaign` (content links use `utm_medium=content` and `utm_campaign=<page-slug>`). ESLint enforces TS/TSX; `tests/static/utm-links.test.ts` enforces MDX.diff --git a/docs/app/(home)/toolkits/[[...slug]]/page.tsx b/docs/app/(home)/toolkits/[[...slug]]/page.tsxindex 6c8a20ee5..e4b66b0d8 100644--- a/docs/app/(home)/toolkits/[[...slug]]/page.tsx+++ b/docs/app/(home)/toolkits/[[...slug]]/page.tsx@@ -1,4 +1,5 @@import { toolkitsSource, getOgImageUrl } from '@/lib/source';+import Link from 'next/link';import { notFound } from 'next/navigation';import { getMDXComponents } from '@/mdx-components';import { ToolkitDetail } from '@/components/toolkits/toolkit-detail';@@ -209,7 +210,7 @@ export default async function ToolkitsPage({ params }: { params: Promise<{ slug?const MDXContent = page.data.body;return (<div>- <a href="/toolkits" className="text-sm text-fd-muted-foreground no-underline hover:text-fd-foreground hover:underline">← All Toolkits</a>+ <Link href="/toolkits" className="text-sm text-fd-muted-foreground no-underline hover:text-fd-foreground hover:underline">← All Toolkits</Link><div className="mt-2 flex items-start justify-between gap-4"><h1 className="text-3xl font-bold text-fd-foreground">{page.data.title}</h1><PageActions path={page.url} variant="inline" />diff --git a/docs/app/global-error.tsx b/docs/app/global-error.tsxindex a7eca39ce..e96b59c42 100644--- a/docs/app/global-error.tsx+++ b/docs/app/global-error.tsx@@ -50,6 +50,8 @@ export default function GlobalError({>Try again</button>+ {/* Client-side nav may be broken inside the global error boundary; a full reload is intentional. */}+ {/* eslint-disable-next-line @next/next/no-html-link-for-pages */}<aclassName="ge-btn-secondary"href="/"diff --git a/docs/components/landing-hero/_stub-links.ts b/docs/components/landing-hero/_stub-links.tsdeleted file mode 100644index 55ec120cc..000000000--- a/docs/components/landing-hero/_stub-links.ts+++ /dev/null@@ -1,7 +0,0 @@-/** Subset of the landing-page link table the hero needs. Kept in this- * shape so the ported `hero-section.tsx` keeps reading `URLS.DASHBOARD`- * and `URLS.DOCS` without code changes. */-export const URLS = {- DASHBOARD: "https://dashboard.composio.dev",- DOCS: "/docs/quickstart",-} as const;diff --git a/docs/components/toolkits/toolkits-landing.tsx b/docs/components/toolkits/toolkits-landing.tsxindex 34f7cb9f7..fe47d0e21 100644--- a/docs/components/toolkits/toolkits-landing.tsx+++ b/docs/components/toolkits/toolkits-landing.tsx@@ -158,7 +158,7 @@ export function ToolkitsLanding() {<div className="flex flex-wrap items-center gap-2"><PageActions path="/toolkits" variant="inline" /><a- href="https://dashboard.composio.dev/~/project/playground"+ href="https://dashboard.composio.dev/~/project/playground?utm_source=docs&utm_medium=toolkits&utm_campaign=playground"target="_blank"rel="noopener noreferrer"className="inline-flex items-center gap-1.5 rounded-md border border-fd-border bg-fd-background px-3 py-1.5 text-sm font-medium text-fd-foreground transition-colors hover:bg-fd-accent"diff --git a/docs/content/changelog/01-08-26-mcp-api-key-enforcement.mdx b/docs/content/changelog/01-08-26-mcp-api-key-enforcement.mdxindex 9b6cecca6..b72ce186e 100644--- a/docs/content/changelog/01-08-26-mcp-api-key-enforcement.mdx+++ b/docs/content/changelog/01-08-26-mcp-api-key-enforcement.mdx@@ -54,7 +54,7 @@ curl -X POST "https://mcp.composio.dev/{your_mcp_server_url}" \### Via Dashboard-1. Navigate to [Project Settings](https://dashboard.composio.dev/{workspace}/{project}/settings)+1. Navigate to [Project Settings](https://dashboard.composio.dev/{workspace}/{project}/settings?utm_source=docs&utm_medium=content&utm_campaign=changelog-01-08-26-mcp-api-key-enforcement)2. Go to the **Project Configuration** tab3. Find the **"Require API Key for MCP"** toggle4. Enable the togglediff --git a/docs/content/changelog/02-15-26-webhook-v3-default-new-orgs.mdx b/docs/content/changelog/02-15-26-webhook-v3-default-new-orgs.mdxindex 7df62daf5..01b892150 100644--- a/docs/content/changelog/02-15-26-webhook-v3-default-new-orgs.mdx+++ b/docs/content/changelog/02-15-26-webhook-v3-default-new-orgs.mdx@@ -21,7 +21,7 @@ Starting today, every new organization created on Composio will automatically usNothing changes for existing organizations. If your organization was created before today:- You will continue to receive webhooks in your current format (V1 or V2)-- You can opt-in to V3 at any time through your [project settings](https://dashboard.composio.dev)+- You can opt-in to V3 at any time through your [project settings](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=changelog-02-15-26-webhook-v3-default-new-orgs)## V3 Payload Recap@@ -46,7 +46,7 @@ Nothing changes for existing organizations. If your organization was created bef## How to Switch to V3 (Existing Organizations)-1. Go to your project settings in the [Composio dashboard](https://dashboard.composio.dev)+1. Go to your project settings in the [Composio dashboard](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=changelog-02-15-26-webhook-v3-default-new-orgs)2. Navigate to the Webhooks section3. Select **Webhook Payload Version: V3**4. Update your webhook handlers using the [migration guide](/docs/changelog/2025/12/30#migration-guide)diff --git a/docs/content/changelog/03-04-26-mcp-api-key-default-new-orgs.mdx b/docs/content/changelog/03-04-26-mcp-api-key-default-new-orgs.mdxindex a13f8078b..784d7516b 100644--- a/docs/content/changelog/03-04-26-mcp-api-key-default-new-orgs.mdx+++ b/docs/content/changelog/03-04-26-mcp-api-key-default-new-orgs.mdx@@ -23,7 +23,7 @@ From **March 5, 2026**, all projects in newly created organizations will have `rNothing changes for existing organizations. If your organization was created before March 5, 2026:- Your current `require_mcp_api_key` setting remains unchanged-- You can opt in at any time through your [project settings](https://dashboard.composio.dev) or via the API+- You can opt in at any time through your [project settings](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=changelog-03-04-26-mcp-api-key-default-new-orgs) or via the API### Opting Out (New Organizations)diff --git a/docs/content/changelog/03-25-26-mcp-endpoint-removed.mdx b/docs/content/changelog/03-25-26-mcp-endpoint-removed.mdxindex 6e2331eee..63ed44920 100644--- a/docs/content/changelog/03-25-26-mcp-endpoint-removed.mdx+++ b/docs/content/changelog/03-25-26-mcp-endpoint-removed.mdx@@ -6,7 +6,7 @@ date: "2026-03-25"We've permanently removed the deprecated `mcp.composio.dev` endpoint that was deprecated in November 2025.-This endpoint was part of our early MCP integration experiments and the latest MCP offering from Composio is [Composio For You](https://dashboard.composio.dev/~/org/connect) (access 1000+ apps through one MCP).+This endpoint was part of our early MCP integration experiments and the latest MCP offering from Composio is [Composio For You](https://dashboard.composio.dev/~/org/connect?utm_source=docs&utm_medium=content&utm_campaign=changelog-03-25-26-mcp-endpoint-removed) (access 1000+ apps through one MCP).### What Changed@@ -16,6 +16,6 @@ This endpoint was part of our early MCP integration experiments and the latest M### Migrating?-If you were still using the old endpoint, head to [https://dashboard.composio.dev/~/org/connect](https://dashboard.composio.dev/~/org/connect) to get started with the new MCP.+If you were still using the old endpoint, head to [https://dashboard.composio.dev/~/org/connect](https://dashboard.composio.dev/~/org/connect?utm_source=docs&utm_medium=content&utm_campaign=changelog-03-25-26-mcp-endpoint-removed) to get started with the new MCP.Questions? Reach out to [email protected]diff --git a/docs/content/changelog/04-24-26-trigger-disabled-event.mdx b/docs/content/changelog/04-24-26-trigger-disabled-event.mdxindex 4d0e61b2a..e8896ec37 100644--- a/docs/content/changelog/04-24-26-trigger-disabled-event.mdx+++ b/docs/content/changelog/04-24-26-trigger-disabled-event.mdx@@ -21,7 +21,7 @@ The event does not fire when you disable a trigger yourself — neither through## Subscribe-Add `composio.trigger.disabled` to your subscription's `enabled_events` — via the [dashboard webhook settings](https://dashboard.composio.dev/~/project/settings/webhook) or the Webhook Subscriptions API:+Add `composio.trigger.disabled` to your subscription's `enabled_events` — via the [dashboard webhook settings](https://dashboard.composio.dev/~/project/settings/webhook?utm_source=docs&utm_medium=content&utm_campaign=changelog-04-24-26-trigger-disabled-event) or the Webhook Subscriptions API:```bashcurl -X PATCH https://backend.composio.dev/api/v3/webhook_subscriptions/ws_your-subscription-id \diff --git a/docs/content/docs/auth-configuration/white-labeling.mdx b/docs/content/docs/auth-configuration/white-labeling.mdxindex ca1fe5d21..51f99da61 100644--- a/docs/content/docs/auth-configuration/white-labeling.mdx+++ b/docs/content/docs/auth-configuration/white-labeling.mdx@@ -27,7 +27,7 @@ The Connect Link is the hosted page your users see when connecting their accountTo replace it with your own branding:-1. Go to **Project Settings** → [**Auth Screen**](https://dashboard.composio.dev/~/project/settings/auth-screen)+1. Go to **Project Settings** → [**Auth Screen**](https://dashboard.composio.dev/~/project/settings/auth-screen?utm_source=docs&utm_medium=content&utm_campaign=docs-auth-configuration-white-labeling)2. Upload your **Logo** and set your **App Title**This applies to all Connect Link flows across all toolkits. Each project has one logo and app title, so if you need different branding per product, use separate projects.@@ -68,7 +68,7 @@ Step-by-step guides: [Google](https://composio.dev/auth/googleapps) | [Slack](ht<Step><StepTitle>Create an auth config in Composio</StepTitle>-In the [Composio dashboard](https://dashboard.composio.dev):+In the [Composio dashboard](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-auth-configuration-white-labeling):1. Go to **Authentication management** → **Create Auth Config**2. Select the toolkit (e.g., GitHub)diff --git a/docs/content/docs/composio-connect.mdx b/docs/content/docs/composio-connect.mdxindex 07472e71d..dbd738c42 100644--- a/docs/content/docs/composio-connect.mdx+++ b/docs/content/docs/composio-connect.mdx@@ -23,7 +23,7 @@ To get started, pick your client below.<Step><StepTitle>Get your API key</StepTitle>-Open the [Composio dashboard](https://dashboard.composio.dev) and click **AI Clients** in the sidebar. Select your client and copy your API key.+Open the [Composio dashboard](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-composio-connect) and click **AI Clients** in the sidebar. Select your client and copy your API key.</Step><Step>@@ -53,7 +53,7 @@ Type `/mcp` in Claude Code to open the MCP server manager and confirm Composio a<Step><StepTitle>Get your API key</StepTitle>-Open the [Composio dashboard](https://dashboard.composio.dev) and click **AI Clients** in the sidebar. Select your client and copy your API key.+Open the [Composio dashboard](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-composio-connect) and click **AI Clients** in the sidebar. Select your client and copy your API key.</Step><Step>@@ -89,7 +89,7 @@ Run `codex mcp list` to confirm Composio appears as a registered MCP server.<Step><StepTitle>Get your API key</StepTitle>-Open the [Composio dashboard](https://dashboard.composio.dev) and click **AI Clients** in the sidebar. Select your client and copy your API key.+Open the [Composio dashboard](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-composio-connect) and click **AI Clients** in the sidebar. Select your client and copy your API key.</Step><Step>@@ -175,7 +175,7 @@ A browser window will open automatically. Sign in to authorize ChatGPT to access<Step><StepTitle>Get your API key</StepTitle>-Open the [Composio dashboard](https://dashboard.composio.dev) and click **AI Clients** in the sidebar. Select your client and copy your API key.+Open the [Composio dashboard](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-composio-connect) and click **AI Clients** in the sidebar. Select your client and copy your API key.</Step><Step>@@ -214,7 +214,7 @@ Restart Cursor. Composio tools are now available in Composer and Agent mode.<Step><StepTitle>Get your API key</StepTitle>-Open the [Composio dashboard](https://dashboard.composio.dev) and click **AI Clients** in the sidebar. Select your client and copy your API key.+Open the [Composio dashboard](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-composio-connect) and click **AI Clients** in the sidebar. Select your client and copy your API key.</Step><Step>@@ -252,7 +252,7 @@ Select **API Key** as the authentication type. Set the key to `x-consumer-api-ke<Step><StepTitle>Get your API key</StepTitle>-Open the [Composio dashboard](https://dashboard.composio.dev) and click **AI Clients** in the sidebar. Select your client and copy your API key.+Open the [Composio dashboard](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-composio-connect) and click **AI Clients** in the sidebar. Select your client and copy your API key.</Step><Step>@@ -294,7 +294,7 @@ Open a GitHub Copilot chat. Composio tools are now available.<Step><StepTitle>Get your API key</StepTitle>-Open the [Composio dashboard](https://dashboard.composio.dev) and click **AI Clients** in the sidebar. Select your client and copy your API key.+Open the [Composio dashboard](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-composio-connect) and click **AI Clients** in the sidebar. Select your client and copy your API key.</Step><Step>@@ -339,7 +339,7 @@ Restart Windsurf. Composio tools are now available in Cascade.<Step><StepTitle>Get your API key</StepTitle>-Open the [Composio dashboard](https://dashboard.composio.dev) and click **AI Clients** in the sidebar. Select your client and copy your API key.+Open the [Composio dashboard](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-composio-connect) and click **AI Clients** in the sidebar. Select your client and copy your API key.</Step><Step>@@ -383,7 +383,7 @@ Save the configuration. Composio tools are now available in Cline.<Step><StepTitle>Get your API key</StepTitle>-Open the [Composio dashboard](https://dashboard.composio.dev) and click **AI Clients** in the sidebar. Select your client and copy your API key.+Open the [Composio dashboard](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-composio-connect) and click **AI Clients** in the sidebar. Select your client and copy your API key.</Step><Step>@@ -415,7 +415,7 @@ Select **Custom headers**. Add a header with name `x-consumer-api-key` and paste<Step><StepTitle>Get your API key</StepTitle>-Open the [Composio dashboard](https://dashboard.composio.dev) and click **AI Clients** in the sidebar. Select your client and copy your API key.+Open the [Composio dashboard](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-composio-connect) and click **AI Clients** in the sidebar. Select your client and copy your API key.</Step><Step>@@ -447,7 +447,7 @@ Select **Header Auth** and create a new credential. Set the header name to `x-co<Step><StepTitle>Get your API key</StepTitle>-Open the [Composio dashboard](https://dashboard.composio.dev) and click **AI Clients** in the sidebar. Select your client and copy your API key.+Open the [Composio dashboard](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-composio-connect) and click **AI Clients** in the sidebar. Select your client and copy your API key.</Step><Step>@@ -477,7 +477,7 @@ Use this config with any MCP-compatible client:## Connect your apps-Your agent will prompt you to connect apps when needed. If you want to connect apps ahead of time, open the [Composio dashboard](https://dashboard.composio.dev) and click **Connect Apps** in the sidebar.+Your agent will prompt you to connect apps when needed. If you want to connect apps ahead of time, open the [Composio dashboard](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-composio-connect) and click **Connect Apps** in the sidebar.## Available MCP tools@@ -503,17 +503,17 @@ Composio Connect exposes 7 meta-tools that orchestrate access to all supported a### The OAuth link expired or didn't open-OAuth links are short-lived. If the browser window doesn't open or the link has expired, ask your agent to retry the action — Composio will generate a fresh link. You can also open the [Composio dashboard](https://dashboard.composio.dev), click **Connect Apps**, and start the flow manually.+OAuth links are short-lived. If the browser window doesn't open or the link has expired, ask your agent to retry the action — Composio will generate a fresh link. You can also open the [Composio dashboard](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-composio-connect), click **Connect Apps**, and start the flow manually.### An app action is failing with an auth error-1. Open the [Composio dashboard](https://dashboard.composio.dev) and click **Connect Apps**.+1. Open the [Composio dashboard](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-composio-connect) and click **Connect Apps**.2. Find the app in question. If the connection is unhealthy, click **Disconnect** and reconnect.3. Retry the action in your agent.### I want to remove or reconnect an app-Open [dashboard.composio.dev](https://dashboard.composio.dev) and click **Connect Apps**. From there you can disconnect, delete, or re-authorize any app.+Open [dashboard.composio.dev](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-composio-connect) and click **Connect Apps**. From there you can disconnect, delete, or re-authorize any app.### I still need helpdiff --git a/docs/content/docs/configuring-sessions.mdx b/docs/content/docs/configuring-sessions.mdxindex 5424788f6..9cbf0859b 100644--- a/docs/content/docs/configuring-sessions.mdx+++ b/docs/content/docs/configuring-sessions.mdx@@ -844,7 +844,7 @@ console.log(result.sessionId, result.deleted);## Browsing the catalog-Before configuring a session, explore the toolkits and tools available. Browse them visually at [dashboard.composio.dev](https://dashboard.composio.dev) or in the [docs catalog](/toolkits), or fetch them programmatically:+Before configuring a session, explore the toolkits and tools available. Browse them visually at [dashboard.composio.dev](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-configuring-sessions) or in the [docs catalog](/toolkits), or fetch them programmatically:<Tabs groupId="language" items={['Python', 'TypeScript']} persist><Tab value="Python">diff --git a/docs/content/docs/custom-app-vs-managed-app.mdx b/docs/content/docs/custom-app-vs-managed-app.mdxindex 8a3f33ddc..877379cbe 100644--- a/docs/content/docs/custom-app-vs-managed-app.mdx+++ b/docs/content/docs/custom-app-vs-managed-app.mdx@@ -40,7 +40,7 @@ The steps below use the dashboard. To create auth configs in code instead, for e<Step><StepTitle>Create the auth config in the Composio dashboard</StepTitle>-In the [Composio dashboard](https://dashboard.composio.dev/~/project/auth-configs):+In the [Composio dashboard](https://dashboard.composio.dev/~/project/auth-configs?utm_source=docs&utm_medium=content&utm_campaign=docs-custom-app-vs-managed-app):1. Click **Create Auth Config**2. Select the toolkitdiff --git a/docs/content/docs/programmatic-auth-configs.mdx b/docs/content/docs/programmatic-auth-configs.mdxindex d6cf5367a..5d8b7ad44 100644--- a/docs/content/docs/programmatic-auth-configs.mdx+++ b/docs/content/docs/programmatic-auth-configs.mdx@@ -4,7 +4,7 @@ description: Create auth configs in code and pass them to a sessionkeywords: [create auth config, auth config sdk, programmatic auth, provision auth config, auth config id]----An [auth config](/docs/authentication#behind-the-scenes) is a blueprint for how a toolkit authenticates: the method, scopes, and credentials. Most of the time you create one in the [dashboard](https://dashboard.composio.dev/~/project/auth-configs) and reuse it. Create them in code when you provision auth dynamically: a config per customer, per environment, or spun up and torn down as part of your app's lifecycle.+An [auth config](/docs/authentication#behind-the-scenes) is a blueprint for how a toolkit authenticates: the method, scopes, and credentials. Most of the time you create one in the [dashboard](https://dashboard.composio.dev/~/project/auth-configs?utm_source=docs&utm_medium=content&utm_campaign=docs-programmatic-auth-configs) and reuse it. Create them in code when you provision auth dynamically: a config per customer, per environment, or spun up and torn down as part of your app's lifecycle.`composio.authConfigs.create()` returns an auth config ID like `ac_xxxxxxxx`. Store that ID, then [pass it to a session](#use-the-auth-config-in-a-session) so the session authenticates with it.diff --git a/docs/content/docs/providers/anthropic.mdx b/docs/content/docs/providers/anthropic.mdxindex f5911ed5e..6b4e96ae4 100644--- a/docs/content/docs/providers/anthropic.mdx+++ b/docs/content/docs/providers/anthropic.mdx@@ -38,7 +38,7 @@ The `AnthropicProvider` transforms Composio tools into the format the Claude Mes**Configure API Keys**<Callout type="info">-Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys) and `ANTHROPIC_API_KEY` with your [Anthropic API key](https://console.anthropic.com/settings/keys).+Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys?utm_source=docs&utm_medium=content&utm_campaign=docs-providers-anthropic) and `ANTHROPIC_API_KEY` with your [Anthropic API key](https://console.anthropic.com/settings/keys).</Callout>```txt title=".env"@@ -183,7 +183,7 @@ The `ClaudeAgentSDKProvider` exposes your Composio tools to the Claude Agent SDK**Configure API Keys**<Callout type="info">-Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys) and `ANTHROPIC_API_KEY` with your [Anthropic API key](https://console.anthropic.com/settings/keys).+Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys?utm_source=docs&utm_medium=content&utm_campaign=docs-providers-anthropic) and `ANTHROPIC_API_KEY` with your [Anthropic API key](https://console.anthropic.com/settings/keys).</Callout>```txt title=".env"diff --git a/docs/content/docs/providers/autogen.mdx b/docs/content/docs/providers/autogen.mdxindex 90e42517b..4b6adbfc6 100644--- a/docs/content/docs/providers/autogen.mdx+++ b/docs/content/docs/providers/autogen.mdx@@ -19,7 +19,7 @@ The provider runs on the [`ag2`](https://github.com/ag2ai/ag2) distribution, the**Configure API Keys**<Callout type="info">-Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).+Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys?utm_source=docs&utm_medium=content&utm_campaign=docs-providers-autogen) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).</Callout>```txt title=".env"diff --git a/docs/content/docs/providers/crewai.mdx b/docs/content/docs/providers/crewai.mdxindex 66c454b6d..a5f14c333 100644--- a/docs/content/docs/providers/crewai.mdx+++ b/docs/content/docs/providers/crewai.mdx@@ -17,7 +17,7 @@ The CrewAI provider turns Composio tools into CrewAI [`BaseTool`](https://docs.c**Configure API Keys**<Callout type="info">-Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).+Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys?utm_source=docs&utm_medium=content&utm_campaign=docs-providers-crewai) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).</Callout>```txt title=".env"diff --git a/docs/content/docs/providers/google.mdx b/docs/content/docs/providers/google.mdxindex 7a47a7afc..69b8f03df 100644--- a/docs/content/docs/providers/google.mdx+++ b/docs/content/docs/providers/google.mdx@@ -33,7 +33,7 @@ In Python, the Gemini provider (`composio_gemini`) wraps Composio tools as typed**Configure API Keys**<Callout type="info">-Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys) and `GOOGLE_API_KEY` with your [Google API key](https://aistudio.google.com/apikey).+Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys?utm_source=docs&utm_medium=content&utm_campaign=docs-providers-google) and `GOOGLE_API_KEY` with your [Google API key](https://aistudio.google.com/apikey).</Callout>```txt title=".env"@@ -139,7 +139,7 @@ The Google ADK provider transforms Composio tools into ADK's `FunctionTool` form**Configure API Keys**<Callout type="info">-Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys) and `GOOGLE_API_KEY` with your [Google API key](https://aistudio.google.com/apikey).+Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys?utm_source=docs&utm_medium=content&utm_campaign=docs-providers-google) and `GOOGLE_API_KEY` with your [Google API key](https://aistudio.google.com/apikey).</Callout>```txt title=".env"diff --git a/docs/content/docs/providers/langchain.mdx b/docs/content/docs/providers/langchain.mdxindex b02ad5efd..57939f206 100644--- a/docs/content/docs/providers/langchain.mdx+++ b/docs/content/docs/providers/langchain.mdx@@ -33,7 +33,7 @@ The LangChain provider transforms each Composio tool into a LangChain [`DynamicS**Configure API Keys**<Callout type="info">-Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).+Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys?utm_source=docs&utm_medium=content&utm_campaign=docs-providers-langchain) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).</Callout>```txt title=".env"@@ -139,7 +139,7 @@ The LangGraph provider transforms Composio tools into the same LangChain `Dynami**Configure API Keys**<Callout type="info">-Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).+Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys?utm_source=docs&utm_medium=content&utm_campaign=docs-providers-langchain) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).</Callout>```txt title=".env"diff --git a/docs/content/docs/providers/llamaindex.mdx b/docs/content/docs/providers/llamaindex.mdxindex 008c9bf0c..13134dfbd 100644--- a/docs/content/docs/providers/llamaindex.mdx+++ b/docs/content/docs/providers/llamaindex.mdx@@ -24,7 +24,7 @@ The LlamaIndex provider turns Composio tools into LlamaIndex [`FunctionTool`](ht**Configure API Keys**<Callout type="info">-Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).+Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys?utm_source=docs&utm_medium=content&utm_campaign=docs-providers-llamaindex) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).</Callout>```txt title=".env"diff --git a/docs/content/docs/providers/mastra.mdx b/docs/content/docs/providers/mastra.mdxindex 8f4c06f18..97e5a9077 100644--- a/docs/content/docs/providers/mastra.mdx+++ b/docs/content/docs/providers/mastra.mdx@@ -17,7 +17,7 @@ The Mastra provider transforms Composio tools into [Mastra's tool format](https:**Configure API Keys**<Callout type="info">-Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).+Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys?utm_source=docs&utm_medium=content&utm_campaign=docs-providers-mastra) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).</Callout>```txt title=".env"diff --git a/docs/content/docs/providers/openai.mdx b/docs/content/docs/providers/openai.mdxindex 7e9c803b7..a8cf8f701 100644--- a/docs/content/docs/providers/openai.mdx+++ b/docs/content/docs/providers/openai.mdx@@ -40,7 +40,7 @@ The `OpenAIResponsesProvider` transforms Composio tools into OpenAI's function-c**Configure API Keys**<Callout type="info">-Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).+Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys?utm_source=docs&utm_medium=content&utm_campaign=docs-providers-openai) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).</Callout>```txt title=".env"@@ -184,7 +184,7 @@ The `OpenAIProvider` targets the Chat Completions API and is the default provide**Configure API Keys**<Callout type="info">-Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).+Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys?utm_source=docs&utm_medium=content&utm_campaign=docs-providers-openai) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).</Callout>```txt title=".env"@@ -318,7 +318,7 @@ The `OpenAIAgentsProvider` transforms Composio tools into the Agents SDK tool fo**Configure API Keys**<Callout type="info">-Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).+Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys?utm_source=docs&utm_medium=content&utm_campaign=docs-providers-openai) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).</Callout>```txt title=".env"diff --git a/docs/content/docs/providers/vercel.mdx b/docs/content/docs/providers/vercel.mdxindex 8fbb51d9c..dee9ce02a 100644--- a/docs/content/docs/providers/vercel.mdx+++ b/docs/content/docs/providers/vercel.mdx@@ -17,7 +17,7 @@ The Vercel AI SDK provider transforms Composio tools into Vercel's [tool format]**Configure API Keys**<Callout type="info">-Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys) and `ANTHROPIC_API_KEY` with your [Anthropic API key](https://console.anthropic.com/settings/keys).+Set `COMPOSIO_API_KEY` with your API key from [Settings](https://dashboard.composio.dev/~/project/settings/api-keys?utm_source=docs&utm_medium=content&utm_campaign=docs-providers-vercel) and `ANTHROPIC_API_KEY` with your [Anthropic API key](https://console.anthropic.com/settings/keys).</Callout>```txt title=".env"diff --git a/docs/content/docs/single-toolkit-mcp.mdx b/docs/content/docs/single-toolkit-mcp.mdxindex aa98db592..9e77ae96a 100644--- a/docs/content/docs/single-toolkit-mcp.mdx+++ b/docs/content/docs/single-toolkit-mcp.mdx@@ -89,7 +89,7 @@ console.log(`Server created: ${server.id}`);</Tabs><Callout type="info">- You can also create and manage MCP configs from the [Composio dashboard](https://dashboard.composio.dev/~/org/connect/clients).+ You can also create and manage MCP configs from the [Composio dashboard](https://dashboard.composio.dev/~/org/connect/clients?utm_source=docs&utm_medium=content&utm_campaign=docs-single-toolkit-mcp).</Callout></Step>diff --git a/docs/content/docs/tools-direct/authenticating-tools.mdx b/docs/content/docs/tools-direct/authenticating-tools.mdxindex a80011d9d..16065a577 100644--- a/docs/content/docs/tools-direct/authenticating-tools.mdx+++ b/docs/content/docs/tools-direct/authenticating-tools.mdx@@ -26,7 +26,7 @@ An **Auth Config** is a blueprint that defines how authentication works for a to<Step><StepTitle>Selecting a toolkit</StepTitle>-Navigate to [Auth Configs](https://dashboard.composio.dev/~/project/auth-configs) tab in your dashboard and click "**Create Auth Config**". Find and select the toolkit you want to integrate (e.g., **Gmail**, **Slack**, **GitHub**).+Navigate to [Auth Configs](https://dashboard.composio.dev/~/project/auth-configs?utm_source=docs&utm_medium=content&utm_campaign=docs-tools-direct-authenticating-tools) tab in your dashboard and click "**Create Auth Config**". Find and select the toolkit you want to integrate (e.g., **Gmail**, **Slack**, **GitHub**).</Step><Step>diff --git a/docs/content/docs/tools-direct/executing-tools.mdx b/docs/content/docs/tools-direct/executing-tools.mdxindex 403cc9db1..c7d659dc6 100644--- a/docs/content/docs/tools-direct/executing-tools.mdx+++ b/docs/content/docs/tools-direct/executing-tools.mdx@@ -211,7 +211,7 @@ If you just want to call a tool without using any framework or LLM provider, you<Callout type="info">**Finding tool parameters and types:**-**Platform UI**: [Auth Configs](https://dashboard.composio.dev/~/project/auth-configs) → Select your toolkit → Tools & Triggers → Select the tool to see its required and optional parameters+**Platform UI**: [Auth Configs](https://dashboard.composio.dev/~/project/auth-configs?utm_source=docs&utm_medium=content&utm_campaign=docs-tools-direct-executing-tools) → Select your toolkit → Tools & Triggers → Select the tool to see its required and optional parameters**CLI**: For Python and TypeScript projects, run `composio generate` to generate types. [Learn more →](/docs/cli#generate-type-definitions)</Callout>diff --git a/docs/content/docs/tools-direct/fetching-tools.mdx b/docs/content/docs/tools-direct/fetching-tools.mdxindex c9a777301..48479f622 100644--- a/docs/content/docs/tools-direct/fetching-tools.mdx+++ b/docs/content/docs/tools-direct/fetching-tools.mdx@@ -61,7 +61,7 @@ const tool = await composio.tools.getRawComposioToolBySlug("GMAIL_SEND_EMAIL");Generate type-safe code for direct SDK execution with [`composio generate`](/docs/cli#generate-type-definitions). This creates TypeScript or Python types from tool schemas.<Callout type="info">-View tool parameters and schemas visually in the [Composio platform](https://dashboard.composio.dev). Navigate to any toolkit and select a tool to see its input/output parameters.+View tool parameters and schemas visually in the [Composio platform](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-tools-direct-fetching-tools). Navigate to any toolkit and select a tool to see its input/output parameters.</Callout>## Filtering toolsdiff --git a/docs/content/docs/tools-direct/toolkit-versioning.mdx b/docs/content/docs/tools-direct/toolkit-versioning.mdxindex b197a3605..c53f962a0 100644--- a/docs/content/docs/tools-direct/toolkit-versioning.mdx+++ b/docs/content/docs/tools-direct/toolkit-versioning.mdx@@ -12,7 +12,7 @@ If you're building an agent, we recommend using [sessions](/docs/configuring-sesToolkit versioning ensures your tools behave consistently across deployments. You can pin specific versions in production, test new releases in development, and roll back when needed.-To view available versions, go to [Dashboard](https://dashboard.composio.dev) > **All Toolkits** > select a toolkit. The version dropdown shows the latest and all available versions:+To view available versions, go to [Dashboard](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-tools-direct-toolkit-versioning) > **All Toolkits** > select a toolkit. The version dropdown shows the latest and all available versions:@@ -25,7 +25,7 @@ Starting from Python SDK v0.9.0 and TypeScript SDK v0.2.0, specifying versions i## Default version behavior<Callout type="warn">-When no version is specified, the API defaults to the base version (`00000000_00`), **not** the latest version. This means the response may contain fewer tools than what's shown on the [platform UI](https://dashboard.composio.dev). To get all available tools including ones added in newer versions, explicitly set `toolkit_versions` to `"latest"` or a specific version.+When no version is specified, the API defaults to the base version (`00000000_00`), **not** the latest version. This means the response may contain fewer tools than what's shown on the [platform UI](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=docs-tools-direct-toolkit-versioning). To get all available tools including ones added in newer versions, explicitly set `toolkit_versions` to `"latest"` or a specific version.</Callout>This applies to both the SDK and direct REST API calls:diff --git a/docs/content/docs/white-labeling-authentication.mdx b/docs/content/docs/white-labeling-authentication.mdxindex 94e6621fa..38c9fee6f 100644--- a/docs/content/docs/white-labeling-authentication.mdx+++ b/docs/content/docs/white-labeling-authentication.mdx@@ -19,7 +19,7 @@ The Connect Link is the hosted page your users see when connecting their accountTo replace it with your own branding:-1. Go to **Project Settings** → [**Auth Screen**](https://dashboard.composio.dev/~/project/settings/auth-screen)+1. Go to **Project Settings** → [**Auth Screen**](https://dashboard.composio.dev/~/project/settings/auth-screen?utm_source=docs&utm_medium=content&utm_campaign=docs-white-labeling-authentication)2. Upload your **Logo** and set your **App Title**This applies to all Connect Link flows across all toolkits, for both [in-chat](/docs/authentication#in-chat-authentication) and [manual](/docs/manually-authenticating) authentication. Each project has one logo and app title, so if you need different branding per product, use separate projects.diff --git a/docs/content/examples/general-agent-with-pi.mdx b/docs/content/examples/general-agent-with-pi.mdxindex 4fca5e6f8..a7391a565 100644--- a/docs/content/examples/general-agent-with-pi.mdx+++ b/docs/content/examples/general-agent-with-pi.mdx@@ -26,7 +26,7 @@ Below you build the whole thing from scratch: a basic agent first, then a piece## Setup-You need a [Composio API key](https://dashboard.composio.dev), a publicly reachable URL for your server, and [Bun](https://bun.sh).+You need a [Composio API key](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=examples-general-agent-with-pi), a publicly reachable URL for your server, and [Bun](https://bun.sh).<Accordions><Accordion title="No public URL? Use a Cloudflare tunnel">diff --git a/docs/content/examples/imessage-agent.mdx b/docs/content/examples/imessage-agent.mdxindex a28ab3f51..45d3db705 100644--- a/docs/content/examples/imessage-agent.mdx+++ b/docs/content/examples/imessage-agent.mdx@@ -35,7 +35,7 @@ Below you build the integration core: the custom toolkit first, then the wiring## Setup-You need a [Composio API key](https://dashboard.composio.dev) and macOS (the iMessage tools drive Messages.app, Contacts.app, and the local `chat.db`).+You need a [Composio API key](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=examples-imessage-agent) and macOS (the iMessage tools drive Messages.app, Contacts.app, and the local `chat.db`).<Steps><Step>diff --git a/docs/content/examples/local-sandbox-pr-reviewer.mdx b/docs/content/examples/local-sandbox-pr-reviewer.mdxindex 9d6a6a9f3..ef237fd3e 100644--- a/docs/content/examples/local-sandbox-pr-reviewer.mdx+++ b/docs/content/examples/local-sandbox-pr-reviewer.mdx@@ -30,7 +30,7 @@ Below you build the host orchestration from scratch: a bare client first, then a## Setup-You need a [Composio API key](https://dashboard.composio.dev), an OpenAI API key for the reviewer agent, a GitHub connection for your `COMPOSIO_USER_ID`, and [Bun](https://bun.sh).+You need a [Composio API key](https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=examples-local-sandbox-pr-reviewer), an OpenAI API key for the reviewer agent, a GitHub connection for your `COMPOSIO_USER_ID`, and [Bun](https://bun.sh).<Accordions><Accordion title="No sandbox provider? Use the E2B sample runner">diff --git a/docs/content/examples/standup-slackbot.mdx b/docs/content/examples/standup-slackbot.mdxindex 1960f40c2..b01c33f96 100644--- a/docs/content/examples/standup-slackbot.mdx+++ b/docs/content/examples/standup-slackbot.mdx@@ -51,7 +51,7 @@ The Slack bot itself follows a deterministic flow: the same menu every day. When## Setup-You need a [Composio API key](https://dashboard.composio.dev/~/project/settings/api-keys), a Slack workspace you can install an app into, and Node with [tsx](https://nodejs.org). The finished bot deploys to [Vercel](https://vercel.com) as two serverless functions, a cron and an interactivity handler, so there's no long-running server.+You need a [Composio API key](https://dashboard.composio.dev/~/project/settings/api-keys?utm_source=docs&utm_medium=content&utm_campaign=examples-standup-slackbot), a Slack workspace you can install an app into, and Node with [tsx](https://nodejs.org). The finished bot deploys to [Vercel](https://vercel.com) as two serverless functions, a cron and an interactivity handler, so there's no long-running server.<PackageInstall packages="@composio/core @composio/vercel ai dayjs" />@@ -101,7 +101,7 @@ Rule of thumb: posting *as the bot* uses `slackbot`; doing something *as a perso<Steps><Step>-**Create an auth config and pick the `Slackbot` toolkit.** In the [Composio dashboard](https://dashboard.composio.dev/~/project/auth-configs), click **Create Auth Config** and search `slackbot`. Choose **Slackbot**, *not* `Slack`: `Slackbot` posts as the bot identity, while `Slack` acts as an individual user.+**Create an auth config and pick the `Slackbot` toolkit.** In the [Composio dashboard](https://dashboard.composio.dev/~/project/auth-configs?utm_source=docs&utm_medium=content&utm_campaign=examples-standup-slackbot), click **Create Auth Config** and search `slackbot`. Choose **Slackbot**, *not* `Slack`: `Slackbot` posts as the bot identity, while `Slack` acts as an individual user.<Figure src="/images/standup-slackbot/auth-config-slackbot.png" alt="Choosing the Slackbot toolkit, not Slack" caption="Pick Slackbot, not Slack" size="lg" /></Step>diff --git a/docs/eslint.config.mjs b/docs/eslint.config.mjsindex c1477b54a..7a5143996 100644--- a/docs/eslint.config.mjs+++ b/docs/eslint.config.mjs@@ -1,8 +1,33 @@import { defineConfig, globalIgnores } from 'eslint/config';import nextVitals from 'eslint-config-next/core-web-vitals';+const utmMessage =+ 'Links to the Composio dashboard must carry utm_source=docs plus utm_medium and utm_campaign so sign-ups can be attributed to docs (MDX links are checked by tests/static/utm-links.test.ts).';+const eslintConfig = defineConfig([...nextVitals,+ {+ rules: {+ // Pre-existing violations across interactive components; warn until the+ // debt is burned down, then flip back to error.+ 'react-hooks/set-state-in-effect': 'warn',+ 'react-hooks/immutability': 'warn',+ 'react-hooks/purity': 'warn',+ 'no-restricted-syntax': [+ 'error',+ {+ selector:+ 'Literal[value=/dashboard\\.composio\\.dev/]:not([value=/utm_source=/])',+ message: utmMessage,+ },+ {+ selector:+ 'TemplateElement[value.raw=/dashboard\\.composio\\.dev/]:not([value.raw=/utm_source=/])',+ message: utmMessage,+ },+ ],+ },+ },globalIgnores(['.next/**','out/**',diff --git a/docs/lib/llm-guardrails/direct-execution.ts b/docs/lib/llm-guardrails/direct-execution.tsindex 941e2e70e..6ed093a0c 100644--- a/docs/lib/llm-guardrails/direct-execution.ts+++ b/docs/lib/llm-guardrails/direct-execution.ts@@ -18,7 +18,7 @@ export const DIRECT_EXECUTION_GUARDRAILS = `### Authenticating Users-Create an **Auth Config** on [dashboard.composio.dev](https://dashboard.composio.dev), then use the auth config ID to generate a hosted auth URL:+Create an **Auth Config** on [dashboard.composio.dev](https://dashboard.composio.dev?utm_source=docs&utm_medium=llm-guardrails&utm_campaign=direct-execution), then use the auth config ID to generate a hosted auth URL:\`\`\`pythonfrom composio import Composiodiff --git a/docs/tests/static/utm-links.test.ts b/docs/tests/static/utm-links.test.tsnew file mode 100644index 000000000..ca27aafaf--- /dev/null+++ b/docs/tests/static/utm-links.test.ts@@ -0,0 +1,81 @@+/**+ * UTM attribution tests.+ *+ * Every markdown link to dashboard.composio.dev in authored content must carry+ * utm_source, utm_medium, and utm_campaign so sign-ups can be attributed to+ * docs. Code fences and inline mentions are exempt; content/reference is+ * generated upstream and excluded. TS/TSX links are enforced by the+ * no-restricted-syntax rule in eslint.config.mjs.+ */+import { describe, test, expect } from "bun:test";+import { readdir, readFile } from "fs/promises";+import { join, relative } from "path";++const CONTENT_DIRS = ["docs", "examples", "changelog"].map((dir) =>+ join(import.meta.dir, "../../content", dir),+);+const CONTENT_ROOT = join(import.meta.dir, "../../content");++const DASHBOARD_LINK_RE = /\]\((https:\/\/dashboard\.composio\.dev[^)\s]*)\)/g;+const REQUIRED_PARAMS = ["utm_source=", "utm_medium=", "utm_campaign="];++async function findMdxFiles(dir: string): Promise<string[]> {+ const results: string[] = [];+ let entries;+ try {+ entries = await readdir(dir, { withFileTypes: true });+ } catch {+ return results;+ }++ for (const entry of entries) {+ const fullPath = join(dir, entry.name);+ if (entry.isDirectory()) {+ results.push(...(await findMdxFiles(fullPath)));+ } else if (entry.name.endsWith(".mdx")) {+ results.push(fullPath);+ }+ }+ return results;+}++function findUntaggedLinks(content: string): { line: number; url: string }[] {+ const violations: { line: number; url: string }[] = [];+ let inFence = false;+ content.split("\n").forEach((line, index) => {+ if (/^\s*(```|~~~)/.test(line)) {+ inFence = !inFence;+ return;+ }+ if (inFence) return;+ for (const match of line.matchAll(DASHBOARD_LINK_RE)) {+ const url = match[1];+ if (!REQUIRED_PARAMS.every((param) => url.includes(param))) {+ violations.push({ line: index + 1, url });+ }+ }+ });+ return violations;+}++describe("Content - dashboard link UTM attribution", () => {+ test("all dashboard links carry utm params", async () => {+ const untagged: string[] = [];++ for (const dir of CONTENT_DIRS) {+ for (const file of await findMdxFiles(dir)) {+ const content = await readFile(file, "utf-8");+ for (const violation of findUntaggedLinks(content)) {+ untagged.push(+ `${relative(CONTENT_ROOT, file)}:${violation.line} ${violation.url}`,+ );+ }+ }+ }++ expect(+ untagged,+ `dashboard links missing utm_source=/utm_medium=/utm_campaign=:\n${untagged.join("\n")}`,+ ).toEqual([]);+ });+});