Skip to main content

Google Analytics

Extractor

Google Analytics 4 (GA4) tracks website and app performance: traffic, engagement, locations, devices, pages and revenue-related activity. Teams connect GA4 to bring that data into a repeatable pipeline, so it can be modelled, reported on, and combined with advertising, CRM, sales or product data from other sources.

At a glance

PropertyValue
AuthenticationOAuth login
Sync typeIncremental
StreamsFixed set of default reports, or your own custom report definitions in their place
Custom queriesSupported (custom report definitions)

What you can sync

  • Overall website performance and engagement
  • Traffic sources and locations
  • Device, OS and browser breakdowns
  • Active-user counts (daily, weekly and 28-day)
  • Page-level traffic and engagement
  • Revenue and transaction performance
  • Any custom report you define yourself, using GA4's own dimensions and metrics

Prerequisites

  • A Google account with access to the GA4 property you want to sync: used for the "Sign in with Google" flow in Meltano Cloud.
  • Property ID: the GA4 property identifier. Find it in the Analytics dashboard under Admin > Property > Property details.

Setup

In Google Analytics

  1. Select the property you want to extract data for.
  2. Go to Admin > Property > Property details.
  3. Copy the Property ID.

In Meltano Cloud

  1. Click "Sign in with Google" and authorize access to your GA4 property.
  2. Enter the Property ID.
  3. Choose a Start Date for extraction.
  4. Optionally set an End Date (leave unset to keep syncing up to today).

Available streams

The tap provides these default streams. Every stream is keyed by date, and all replicate incrementally between your Start Date and (optional) End Date.

website_overview

Overview of website performance.

FieldDescription
dateDimension. The reporting date for the row.
activeUsersMetric. The number of active users.
newUsersMetric. The number of first-time users.
sessionsMetric. The number of sessions recorded.
sessionsPerUserMetric. The average number of sessions per user.
averageSessionDurationMetric. The average duration of sessions.
screenPageViewsMetric. The total number of page or screen views.
screenPageViewsPerSessionMetric. The average number of page or screen views per session.
bounceRateMetric. The percentage of sessions that were not engaged.
engagementRateMetric. The percentage of engaged sessions.

traffic_sources

Where website traffic originates from.

FieldDescription
dateDimension. The reporting date for the row.
sourceDimension. The source that sent traffic, such as a website or referrer.
mediumDimension. The marketing medium for the traffic source, such as organic, referral, or cpc.
sourcePlatformDimension. The platform associated with the traffic source.
activeUsersMetric. The number of active users.
sessionsMetric. The number of sessions recorded.
sessionsPerUserMetric. The average number of sessions per user.
bounceRateMetric. The percentage of sessions that were not engaged.
engagementRateMetric. The percentage of engaged sessions.

locations

Website activity by country, region, and city.

FieldDescription
dateDimension. The reporting date for the row.
countryDimension. The country where the activity originated.
countryIdDimension. The Google Analytics identifier for the country.
regionDimension. The region or state where the activity originated.
cityDimension. The city where the activity originated.
cityIdDimension. The Google Analytics identifier for the city.
activeUsersMetric. The number of active users.
newUsersMetric. The number of first-time users.
sessionsMetric. The number of sessions recorded.
sessionsPerUserMetric. The average number of sessions per user.
averageSessionDurationMetric. The average duration of sessions.
screenPageViewsMetric. The total number of page or screen views.
screenPageViewsPerSessionMetric. The average number of page or screen views per session.
bounceRateMetric. The percentage of sessions that were not engaged.
engagementRateMetric. The percentage of engaged sessions.

four_weekly_active_users

Active users measured over a rolling 28-day period.

FieldDescription
dateDimension. The reporting date for the row.
active28DayUsersMetric. The number of active users over the last 28 days.

weekly_active_users

Active users measured over a rolling 7-day period.

FieldDescription
dateDimension. The reporting date for the row.
active7DayUsersMetric. The number of active users over the last 7 days.

daily_active_users

Active users measured over a rolling 1-day period.

FieldDescription
dateDimension. The reporting date for the row.
active1DayUsersMetric. The number of active users over the last 1 day.

devices

Website activity by device, operating system, and browser.

FieldDescription
dateDimension. The reporting date for the row.
deviceCategoryDimension. The type of device used, such as desktop, tablet, or mobile.
deviceModelDimension. The model of device used by the visitor.
operatingSystemDimension. The operating system used by the visitor.
browserDimension. The browser used by the visitor.
activeUsersMetric. The number of active users.
newUsersMetric. The number of first-time users.
sessionsMetric. The number of sessions recorded.
sessionsPerUserMetric. The average number of sessions per user.
averageSessionDurationMetric. The average duration of sessions.
screenPageViewsMetric. The total number of page or screen views.
screenPageViewsPerSessionMetric. The average number of page or screen views per session.
bounceRateMetric. The percentage of sessions that were not engaged.
engagementRateMetric. The percentage of engaged sessions.

transactions

Revenue and transaction performance overview.

FieldDescription
dateDimension. The reporting date for the row.
activeUsersMetric. The number of active users.
averageRevenuePerUserMetric. The average revenue generated per user.
newUsersMetric. The number of first-time users.
purchaseRevenueMetric. The revenue generated from purchases.
sessionsMetric. The number of sessions recorded.
totalRevenueMetric. The total revenue attributed in the report.
transactionsMetric. The number of completed transactions.

pages

Page-level traffic and engagement performance.

FieldDescription
dateDimension. The reporting date for the row.
hostNameDimension. The hostname where the page was viewed.
pagePathDimension. The path portion of the viewed page URL.
sessionMediumDimension. The session-level marketing medium.
sessionSourceDimension. The session-level traffic source.
activeUsersMetric. The number of active users.
bounceRateMetric. The percentage of sessions that were not engaged.
engagedSessionsMetric. The number of engaged sessions.
engagementRateMetric. The percentage of engaged sessions.
eventCountMetric. The total number of tracked events.
screenPageViewsMetric. The total number of page or screen views.
screenPageViewsPerUserMetric. The average number of page or screen views per user.
screenPageViewsPerSessionMetric. The average number of page or screen views per session.
userEngagementDurationMetric. The amount of time users were actively engaged.

Advanced configuration

  • Custom report definitions: define your own reports, and they replace all of the default streams above (not just add to them). Each report picks up to 7 dimensions and up to 10 metrics from GA4's dimensions and metrics reference. Two ways to supply them:
    • Report definitions list (reports_list): define reports inline:

      [
      {
      "name": "traffic_overview",
      "dimensions": ["date", "country"],
      "metrics": ["activeUsers", "sessions"]
      },
      {
      "name": "device_analysis",
      "dimensions": ["date", "deviceCategory"],
      "metrics": ["activeUsers", "engagedSessions", "engagementRate"]
      }
      ]
    • Report definitions file (reports): point at a project-relative JSON file with the same structure, if you'd rather keep the definitions out of your config.

  • Schema flattening: enable Flattening Enabled to automatically expand nested properties into flat columns, and set Flattening Max Depth to control how deep that goes.
  • Stream maps: use Stream Maps / Stream Map Config to rename, filter or transform records via config. See the Meltano SDK stream maps docs.

If reports / reports_list is not provided, the tap uses its default reports definition.

Settings

SettingTypeDescription
property_idstringGoogle Analytics Property ID. Found in Google Analytics under Admin > Property > Property details.
start_datedateThe earliest record date to sync.
end_datedateThe last record date to sync.
reportsstringA project-relative path to a JSON file with the definition of the reports to be generated. Uses the tap's default reports definition if not provided.
reports_listarrayA list of report definitions to be generated directly in the config, as an alternative to reports.
flattening_enabledbooleanTrue to enable schema flattening and automatically expand nested properties.
flattening_max_depthintegerThe max depth to flatten schemas.
stream_map_configobjectUser-defined config values to be used within map expressions.
stream_mapsobjectConfig object for the stream maps capability.

Need help?

If a stream or field you need isn't listed here or the connector doesn't work as expected, file it through the usual Meltano support channel.