geo-device-segmentation
Skill244 starsChanged 43 days agoMITView on GitHub
Break down user behaviour by country, city, device category, and OS to understand regional patterns and optimise for your key markets.
Files
Geo and Device Segmentation
Break down user behaviour by country, city, device category, and OS to understand regional patterns and optimise for your key markets.
Correct dimension names
| Concept | GA4 API name |
| Country | country |
| City | city |
| Region | region |
| Device category | deviceCategory |
| Operating system | operatingSystem |
| OS version | operatingSystemVersion |
| Browser | browser |
| Screen resolution | screenResolution |
| Language | language |
Device category values: desktop, mobile, tablet.
Step 1 — Country breakdown
dimensions: ["country"]
metrics: ["totalUsers", "sessions", "userEngagementDuration",
"screenPageViewsPerSession", "keyEvents"]
date_range: last 30 days
order_by: totalUsers DESC
limit: 20Step 2 — Device split
dimensions: ["deviceCategory"]
metrics: ["sessions", "totalUsers", "engagementRate",
"userEngagementDuration", "bounceRate"]
date_range: last 30 days
order_by: sessions DESCStep 3 — Country + device cross-tab
Understand device preferences by market:
dimensions: ["country", "deviceCategory"]
metrics: ["sessions", "userEngagementDuration", "bounceRate"]
dimension_filter: country IN [your top 5 countries from Step 1]
date_range: last 30 days
order_by: sessions DESCNote: combining country + deviceCategory + additional dimensions in one query may exceed GA4's cardinality limit. Keep to 2–3 dimensions max.
Step 4 — Single-country deep dive
For a specific country (e.g. Japan):
dimensions: ["city", "deviceCategory"]
metrics: ["sessions", "totalUsers", "userEngagementDuration", "keyEvents"]
dimension_filter: {
"filter": {
"fieldName": "country",
"stringFilter": {"matchType": "EXACT", "value": "Japan"}
}
}
date_range: last 30 days
order_by: sessions DESC
limit: 20Step 5 — Browser and OS (for technical optimisation)
dimensions: ["browser", "operatingSystem", "deviceCategory"]
metrics: ["sessions", "bounceRate", "userEngagementDuration"]
date_range: last 30 days
order_by: sessions DESC
limit: 20What to report
- Top 10 countries by users and their engagement quality
- Mobile vs desktop vs tablet split (sessions and engagement rate)
- Any country where engagement is significantly below average — flagged for investigation
- Device preferences by your top 3 markets if they differ meaningfully
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
- custom-dimensionsSkill
- date-rangesSkill
- ecommerce-analysisSkill
- filter-structuresSkill
- ga4-limitationsSkill
- gcp-setupSkill
- 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.

