custom-dimensions
Skill244 starsChanged 43 days agoMITView on GitHub
How to find and query property-specific custom dimensions in GA4.
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Always call search_schema("custom") first — it will show every registered custom dimension for this exact property.
- Distinctive: line 27
If the property has not collected this parameter, the API returns an error.
- Very specific: line 38
Call search_schema("custom") — lists all registered custom dimensions.
- Distinctive: line 39
If the one you need appears, use its exact API name.
- Very specific: line 40
If it does not appear, ask the user what event parameter name their tracking code uses, then query with customEvent:that_name.
- Distinctive: line 42
If the query still fails, the parameter is not collected by this property.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Custom Dimensions and Event Parameters
How to find and query property-specific custom dimensions in GA4.
The core rule
Custom dimensions are property-specific. Never guess their names.
Always call search_schema("custom") first — it will show every registered
custom dimension for this exact property.
Two valid syntaxes
GA4 supports two ways to access custom data:
Registered custom dimensions — appear in the schema by their registered name.
Find them with search_schema. Use the name exactly as returned.
Unregistered event parameters — accessed inline with:
customEvent:parameter_namefor event-scoped parameterscustomUser:property_namefor user-scoped properties
The parameter_name must exactly match what your tracking code sends.
If the property has not collected this parameter, the API returns an error.
Why guessing fails
The model cannot know what custom parameters a GA4 property uses —
they are defined by the site's own tracking code and GA4 Admin settings.
customEvent:page_category works on one property and fails on another
depending on whether that property's tracking sends a page_category parameter.
Workflow
- Call
search_schema("custom")— lists all registered custom dimensions. - If the one you need appears, use its exact API name.
- If it does not appear, ask the user what event parameter name their
tracking code uses, then query with
customEvent:that_name. - If the query still fails, the parameter is not collected by this property.
Scope matters
| Scope | Syntax | Use for |
| Event | customEvent:name | per-hit data (page category, product id, etc.) |
| User | customUser:name | user attributes (plan, cohort, customer type) |
| Session | registered name only | session-level custom groupings |
Mixing scopes can cause incompatibility errors — see the compatible-combinations skill.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/llms-full.txtllms.txt
- docs/llms.txtllms.txt
- llms.txtllms.txt
- ga4-analyticsSkill
- ai-referral-analysisSkill
- attribution-scopeSkill
- bot-traffic-detectionSkill
- channel-acquisitionSkill
- common-metric-namesSkill
- compatible-combinationsSkill
- content-performanceSkill
- date-rangesSkill
- ecommerce-analysisSkill
- filter-structuresSkill
- ga4-limitationsSkill
- gcp-setupSkill
- geo-device-segmentationSkill
- gcp-setupSkill
- traffic-diagnosisSkill
- ua-to-ga4Skill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

