The geo columns can provide details about the geographic location where an event originated, such as the country, region or city.
Please keep in mind that these values are derived from the user’s IP address, which may not always be accurate, especially if the user is utilizing a VPN or similar services.
Field Name | Data Type | Description | Example Values |
---|---|---|---|
geo.continent | STRING | The continent from which the event was initiated | Europe Americas Asia |
geo.sub_continent | STRING | The sub-continent from which the event was initiated | Northern Europe South America Australasia |
geo.country | STRING | The country from which the event was initiated | United Kingdom Brazil United States |
geo.region | STRING | The region from which the event was initiated | England New York Louisiana |
geo.metro | STRING | The metro area from which the event was initiated | London Austin TX North Scotland |
geo.city | STRING | The city from which the event was initiated | London Berlin Winchester |
Sample geo fields query
Select the geo fields you need from the below query.
SELECT
geo.continent,
geo.sub_continent,
geo.country,
geo.region,
geo.metro,
geo.city
FROM `<project>.<dataset>.<table>`
Important Note: Make sure you replace the placeholders within the WHERE clause with the specific values for the table you are working with. For example, if you want to extract data for January 31st 2021 from the e-commerce sample dataset, use the following values:
- <project> should be replaced with bigquery-public-data
- <dataset> should be replaced with ga4_obfuscated_sample_ecommerce
- <table> should be replaced with events_20210131
Ensure that you substitute these placeholders with your actual project, dataset, and table names when executing the queries.
For details and examples of other fields & dimensions see: