Prompt
Need to track brand mentions by country and language
Latest observation
Nov 2, 2026
OpenAI APIWeb search: off
To track brand mentions by country and language, the cleanest approach is to combine mention collection, language detection, and geo attribution into one reporting pipeline.
What to track
For each mention, capture:
- Brand name / keyword
- Mention text
- Source: X, Reddit, news, blogs, forums, etc.
- Author location if available
- Page country / domain country
- Detected language
- Timestamp
- Sentiment (optional)
- Country assigned
- Language assigned
How to assign country
Use the best available signal in this order:
-
Explicit user location
From profile location, bio, or site metadata -
Source/domain country
.fr→ likely France- local news domains
- country-specific social accounts
-
Content cues
- Language + place names in text
- Currency, phone formats, addresses
-
IP geolocation
- Only if you own the traffic/source data
-
Fallback
- Mark as
unknown
- Mark as
How to assign language
Use language detection on:
- mention text
- title/snippet
- full article when possible
Common libraries/tools:
- fastText langid
- Google Cloud Language
- AWS Comprehend
- CLD3
- spaCy language detection add-ons
Recommended schema
A simple table structure:
| field | example |
|---|---|
| mention_id | 12345 |
| brand | Acme |
| source | |
| text | “Love Acme in Spain” |
| detected_language | en |
| assigned_country | ES |
| confidence_country | 0.87 |
| confidence_language | 0.99 |
| created_at | 2026-11-02 |
Reporting views
Build dashboards by:
- Mentions by country
- Mentions by language
- Mentions by country + language
- Sentiment by country/language
- Top sources by country
- Trend over time
Example breakdown:
| Country | Language | Mentions |
|---|---|---|
| US | English | 1,240 |
| ES | Spanish | 680 |
| FR | French | 410 |
| CA | English | 300 |
| CA | French | 190 |
Best practices
- Don’t rely on language alone to infer country
- Keep a confidence score for each assignment
- Allow multi-country mentions if the text discusses multiple markets
- Normalize country names to ISO 3166-1 alpha-2 codes
- Normalize languages to ISO 639-1 codes
If you want to implement this
I can help you with any of these:
- a SQL schema
- a Python pipeline
- a dashboard design
- a Looker/Tableau/Power BI model
- a tool stack recommendation
If you'd like, I can give you a ready-to-use database schema and sample code for this.