How can I see which countries my traffic comes from? Pageview and Session Start both don't show 'Country Code' anymore.
The Country / mp_country_code property should still be available on your events โ here are the most likely reasons it's no longer appearing in the dropdowns and how to fix them:
Why the Property May Be Hidden
1. The property hasn't been sent in the last 28 days
Mixpanel automatically hides event properties and property values from dropdown menus if they haven't been received in the last 28 days. The data still exists in your project, but it won't show in the UI. [Inactive Events and Properties]
Fix: You can search for the property by typing its name directly in the dropdown (it's case-sensitive). Alternatively, sending a single event with that property will resurface it in the UI.
2. The property was hidden in Lexicon
Project Owners and Admins can hide event properties via Lexicon, which would make them disappear from report dropdowns. [Hidden in Lexicon]
Fix: Check Lexicon to see if mp_country_code (or Country) has been hidden.
Why Country Data May Not Be Populating at All
If the property is missing from the raw data itself (not just the UI), the issue is likely with geolocation enrichment:
Server-side tracking: If your events are sent from a server, Mixpanel uses the server's IP address for geolocation, not the end user's. This can result in all events showing the same location (your server's location) or no useful country data. [Sending Data to Mixpanel]
Fix: Pass the actual client IP address using the ip property in your event payload, or manually set mp_country_code, $region, and $city directly on the event. [Manual Geolocation Tracking]
Example event payload with manual geolocation:
{
"event": "Pageview",
"properties": {
"distinct_id": "user_123",
"token": "your_project_token",
"mp_country_code": "US",
"$region": "California",
"$city": "San Francisco"
}
}Or by passing the client IP so Mixpanel can resolve it automatically:
{
"event": "Pageview",
"properties": {
"distinct_id": "user_123",
"token": "your_project_token",
"ip": "136.24.0.114"
}
}In summary, start by searching for mp_country_code directly in the property dropdown (case-sensitive). If it doesn't appear at all, check Lexicon for hidden properties, and verify your tracking implementation is correctly passing IP or geolocation data.
โน๏ธย Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
