Skip to content

Connect GTM to Cursor

  • Will my change break a trigger?

Keep the tracking code you write in Cursor in sync with the tags and triggers in Google Tag Manager. Lemonado connects them in about 2 minutes, no API keys needed.

MCPhttps://mcp.lemonado.io/mcp

Why connect GTM to Cursor?

When you edit a checkout or a form in Cursor, you rarely open GTM to check what depends on it. Add Lemonado and Cursor's agent can read the container while you work, so it warns you when a change in your code will stop a trigger from firing.

  • All your GTM data

    Accounts, containers and workspaces, ready to ask about.

  • Always today's numbers

    Triggers and the conditions behind them, synced from GTM automatically, so answers use today's numbers.

  • Connect all your tools

    Questions like "Why did conversions drop?" use GTM and GA4, Google Ads at once.

How to connect GTM to Cursor

Before you start

  • A Google Tag Manager account you can sign in to
  • Cursor installed
  • A Lemonado account (the free trial works)
  1. 1

    Connect Google Tag Manager in Lemonado

    In Lemonado, open Connectors, find Google Tag Manager and sign in. Sign in with a Google account that has at least Read access to the GTM containers you want to audit. Pick the web container your site uses.

  2. 2

    Turn on external access

    In the company's settings, open External tools, turn the connection on, choose which sources it can reach and copy the server URL.

    text
    https://mcp.lemonado.io/mcp
  3. 3

    Open your MCP config

    Open ~/.cursor/mcp.json for every project, or .cursor/mcp.json for this project only. Create the file if it doesn't exist.

  4. 4

    Add Lemonado

    Merge this into the file and save.

    json
    {
      "mcpServers": {
        "lemonado": {
          "url": "https://mcp.lemonado.io/mcp"
        }
      }
    }
  5. 5

    Sign in

    Cursor asks you to sign in to Lemonado. Approve access, then ask the agent about your data.

  6. 6

    Ask Cursor about GTM

    Try "I'm changing the thank-you page route from /thank-you to /order/complete. Which GTM triggers depend on that URL?" Or ask: "Which clicks are tracked?" or "Is the form tracked?"

Good to know

  • Editing the file directly avoids relying on menu labels that change between Cursor versions.

What can Cursor do with GTM?

Cursor's agent reads your GTM data while it edits: it fills components with real data, checks tracking code and writes the analysis next to your code.

Cursor logoCursor

I'm changing the thank-you page route from /thank-you to /order/complete. Which GTM triggers depend on that URL?

Four triggers match Page Path equals /thank-you, and 11 tags use them, including every purchase conversion. They need to match the new path before you deploy.

Source: GTM + your code

Reading this as an AI agent?

Everything an agent needs to set this up, in plain text. Paste this page's link into Cursor and ask it to connect you, or copy the block.

For agents · markdown
# Connect Google Tag Manager to Cursor (Lemonado MCP)

- Server URL: https://mcp.lemonado.io/mcp
- Transport: Streamable HTTP
- Auth: OAuth; the user signs in to Lemonado in the browser. No API keys.
- In Lemonado: connect the GTM account and container. Sign in with a Google account that has at least Read access to the GTM containers you want to audit. Pick the web container your site uses.
- In Cursor: ~/.cursor/mcp.json

```json
{
  "mcpServers": {
    "lemonado": {
      "url": "https://mcp.lemonado.io/mcp"
    }
  }
}
```

First question to try: "I'm changing the thank-you page route from /thank-you to /order/complete. Which GTM triggers depend on that URL?"

More: https://lemonado.io/integrations/google-tag-manager · https://lemonado.io/llms.txt
FAQ

Frequently Asked Questions

No. Read access to the container is enough, because Lemonado only reads it. Publishing stays with whoever owns the container in Tag Manager.

No, Google doesn't run one. Community servers exist, and most can edit and publish your container, so check what you grant them. Lemonado gives Cursor read-only access to your containers, next to GA4 and your ad platforms.

Open Cursor's settings and find lemonado in the MCP list. A red dot or a sign-in prompt means the login expired. Restart Cursor after editing mcp.json. In Lemonado, check that Google Tag Manager is connected and External tools is on for the company. If a container is missing, your Google user needs access to it in Tag Manager > Admin > User Management. Account access alone isn't always enough.

Yes, if both are connected in Lemonado. One connection reaches every source you allow, so you can ask things like "Compare the GA4 events our GTM tags send with the events GA4 actually received last week."

MCP is included in Lemonado's paid plans and in the free trial, so you can try it before you pay.

See plans and pricing

Still have a question?

Shoot us an email at hello@lemonado.io.

Try for free

Stop fighting with data. Start feeding your AI.

Connect your data to AI and free your team from reporting and busywork.

Try Lemonado free