agentsclimarketplace

Attribution scope

Skill surendranb/google-analytics-mcp/skills/attribution-scope

GA4 has three distinct attribution scopes. Using the wrong scope gives misleading results. Choose based on the question you are answering.From its SKILL.md

Install
npx -y skills add surendranb/google-analytics-mcp --skill attribution-scope

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

2.8 KB, as published. Nobody here has run it

Attribution Scope

GA4 has three distinct attribution scopes. Using the wrong scope gives misleading results. Choose based on the question you are answering.

The three scopes

ScopeDimension prefixQuestion it answersWhen to use
SessionsessionWhere did THIS session come from?Traffic Acquisition — volume, engagement, conversions by source
First-userfirstUserWhich channel originally acquired this user?User Acquisition — who brought in new users
Event/attribution(no prefix)Which channel gets credit for this conversion?Advertising reports — AI-weighted conversion credit allocation

Dimensions by scope

Session scope — use for traffic analysis:

  • sessionDefaultChannelGroup
  • sessionSource
  • sessionMedium
  • sessionCampaignName
  • sessionSourceMedium

First-user scope — use for acquisition analysis:

  • firstUserDefaultChannelGroup
  • firstUserSource
  • firstUserMedium
  • firstUserCampaignName

Event/attribution scope — use only in advertising/conversion contexts:

  • defaultChannelGroup (no prefix)
  • source (no prefix)
  • medium (no prefix)

How to choose

"Where is my traffic coming from?" → session scope

dimensions: ["sessionDefaultChannelGroup", "sessionSource", "sessionMedium"]
metrics: ["sessions", "totalUsers", "engagedSessions", "keyEvents"]

"Which channels are bringing in new users?" → first-user scope

dimensions: ["firstUserDefaultChannelGroup", "firstUserSource"]
metrics: ["newUsers", "totalUsers"]

"How should I attribute conversion credit across channels?" → event scope (Use only with advertising campaign analysis; this is AI-weighted attribution.)

Common mistake

A user acquired via Instagram who later converts via Google Organic will show:

  • sessionDefaultChannelGroup = "Organic Search" (where this session came from)
  • firstUserDefaultChannelGroup = "Organic Social" (where they were first acquired)

These are different questions. Mixing scopes in one query produces meaningless results. Never combine sessionSource with firstUserMedium in the same report.

Nested filters

When filtering, use the same scope as your dimensions:

// Filtering traffic acquisition report — use session-scoped dimension
{"filter": {"fieldName": "sessionDefaultChannelGroup", "stringFilter": {"value": "Organic Search", "matchType": "EXACT"}}}

// NOT source (attribution scope) — wrong scope for this report
{"filter": {"fieldName": "source", "stringFilter": {"value": "google", "matchType": "EXACT"}}}

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.