This example query contains all following Google Analytics geo network dimensions and metrics. If you only need one dimension or metric, look at the
-- comments in the example query and copy the part you need from the
select clause. Make sure that you also add any additional conditions (in the
group by and
order by) that are necessary to calculate the results correctly.
Geo Network dimensions
- sub continent
- network domain
- service provider
- city id
Geo Network metrics
select -- continent (dimension) geonetwork.continent as continent, -- sub continent (dimension) geonetwork.subcontinent as sub_continent, -- country (dimension) geonetwork.country as country, -- region (dimension) geonetwork.region as region, -- metro (dimension) geonetwork.metro as metro, -- city (dimension) geonetwork.city as city, -- latitude (dimension) geonetwork.latitude as latitude, -- longitude (dimension) geonetwork.longitude as longitude, -- network domain (dimension) geonetwork.networkdomain as network_domain, -- service provider (dimension) geonetwork.networklocation as service_provider, -- city id (dimension) geonetwork.cityid as city_id from `bigquery-public-data.google_analytics_sample.ga_sessions_20160801` where totals.visits = 1
Enjoying this post? Subscribe to the GA4BigQuery newsletter!
You will receive regular updates (max 1x/week) straight in your inbox. You can unsubscribe anytime.