Add Sprites to GitHub Copilot
Available on Copilot in VS Code, and Copilot CLI. Any Copilot plan that includes agent mode. You need a Sprites account with Google Analytics 4 already connected — the connector acts on that connection, so GitHub Copilot never handles a GA4 credential.
Open the MCP configuration
Run MCP: Add Server from the Command Palette and choose Workspace or Global. Workspace writes .vscode/mcp.json, which is worth committing so the team shares the same connector; Global keeps it to you across every project.
VS CodeCommand PaletteMCP: Add ServerWorkspaceAdd Sprites as an HTTP server
The top-level key is servers, not mcpServers, and a remote endpoint needs an explicit type of http. This is the shape VS Code and Copilot share.
.vscode/mcp.json{ "servers": { "sprites": { "type": "http", "url": "https://mcp.sprites.ai/mcp" } } }Authenticate
VS Code shows an Auth action above the server entry once the file is saved. Run it, sign in to Sprites in the browser window that opens, and approve the scopes.
Spriteswants access on behalf of Copilot- Read your connected ad accounts and site data
- Draft campaigns, creatives and pages for your approval
- Apply only the changes you approve
AllowCancelSwitch Copilot Chat to agent mode
MCP tools are only offered to the agent. Pick Agent from the mode dropdown in Copilot Chat, then open the tool picker and confirm Sprites is listed.
Agent modeCopilot Chat → mode dropdown
Run the first prompt
Ask GitHub Copilot this. It routes to a Sprites door, which reads your Google Analytics 4 account and answers — no account to name, no confirmation to give first.
- With Sprites, what happened to conversions last week and which channel caused it?
- Ask Sprites for our top 10 landing pages by conversion rate this month.
- Use Sprites to compare organic and paid revenue quarter over quarter in GA4.
- Have Sprites break down ecommerce revenue by product for the last 30 days.
- With Sprites, set up a Monday brief on traffic, conversions and the biggest change.
Open the Copilot Chat tool picker in agent mode; Sprites appears with its tools, each one toggleable.
What GitHub Copilot can do with Google Analytics 4
The same doors, whichever client you are in. Marketing data inside the editor where the tracking code lives, so a conversion event can be checked against what GA4 actually recorded before the pull request is opened.
Ask in English, get the report run
No explorations, no dimension picker. The question becomes a GA4 query and the answer comes back with the numbers attached.
Channel attribution that names a cause
Which source actually moved, separated from the one that merely moved with it.
Item-scoped ecommerce
Revenue, quantity and conversion rate per product, not just per session — the breakdown GA4 buries.
Landing pages that earn and landing pages that leak
Entry page performance against conversions, ranked, with the drop-off stated.
Join it to the ad accounts
Because the same connector reads Google Ads and Meta, a GA4 answer can be checked against what the platforms claim.
A standing weekly read
A scheduled brief that runs against GA4 and messages you only when a number breaks trend.
How approvals work here
GitHub Copilot renders tool results as text, so a GA4 change comes back written out rather than as a card. Nothing is applied until you approve it, and the approval waits for you in Sprites — open it there and the same run continues.
What it reads
- Sessions, users, engagement and conversions by any GA4 dimension
- Channel, source, medium and campaign attribution
- Landing pages, events and funnels
- Item-scoped ecommerce: revenue, quantity and per-product conversion
What it can change
- Nothing. GA4 is read-only through this connector by design
- Changes it recommends land on the ad or SEO channel they belong to, each with its own approval
When it does not work in GitHub Copilot
Three things go wrong in this client specifically, and each has a one-line fix.
Sprites is configured but Copilot never uses it.
Chat is not in agent mode. Ask mode does not call MCP tools at all.
The config is ignored.
The top-level key is servers. mcpServers is the shape other clients use and VS Code does not read it.
Teammates do not see the connector.
It was added Globally rather than to the Workspace. Move it to .vscode/mcp.json and commit that file; each person still signs in as themselves.
Google Analytics 4 and GitHub Copilot: questions
Which URL do I paste into GitHub Copilot?
https://mcp.sprites.ai/mcp. There is one endpoint and every client uses it — every OAuth grant is bound to exactly that address, so a variant of it will not be honoured.
Can GitHub Copilot change my Google Analytics 4 account without asking?
GitHub Copilot renders tool results as text, so a GA4 change comes back written out rather than as a card. Nothing is applied until you approve it, and the approval waits for you in Sprites — open it there and the same run continues.
Do I need a Google Analytics 4 API key or developer token?
No. Google Analytics 4 is connected once inside Sprites through Google Analytics 4, and the connector acts on that connection. GitHub Copilot never sees a credential for it.
Why GitHub Copilot for Google Analytics 4 specifically?
Marketing data inside the editor where the tracking code lives, so a conversion event can be checked against what GA4 actually recorded before the pull request is opened.
Can it change anything in GA4?
No. GA4 is read-only through this connector on purpose. If the answer implies a change, it is proposed on the channel that owns it — an ad account, a page — with its own approval.
Do I need to know GA4 dimensions and metrics?
No. You ask the question; Sprites picks the dimensions, runs the report and states what it queried so you can check the working.
Keep going
The same GitHub Copilot connector reaches every other channel — nothing else to add.
Google Analytics 4, from GitHub Copilot
Paste one URL, sign in once, and the next GA4 question you ask GitHub Copilot gets answered from the live account.