Google Analytics
G
Google Analytics

tap-google-analytics (meltanolabs variant)

Meltano Tap Google Analytics is a Singer tap for extracting Google Analytics 4 (GA4) data into Meltano Cloud for reporting, modelling, and downstream analysis.

It helps you collect website and app performance data from Google Analytics in a repeatable pipeline so you can analyse traffic, engagement, locations, devices, pages, and revenue-related activity alongside data from your other business systems.

Use this connector when you want to:

  • centralise Google Analytics data in your warehouse
  • build dashboards and reports on website performance
  • track traffic sources, user behaviour, and engagement trends over time
  • combine analytics data with advertising, CRM, sales, or product data
  • customise the extracted reports using your own stream definitions

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. Login and connect with your Google account
  2. Enter the property ID
  3. Choose a start date for extraction

Streams

The tap provides the following default streams:

website_overview

Overview of the website performance.

Properties

Name | Description --- | --- date | Dimension. The reporting date for the row. activeUsers | Metric. The number of active users. newUsers | Metric. The number of first-time users. sessions | Metric. The number of sessions recorded. sessionsPerUser | Metric. The average number of sessions per user. averageSessionDuration | Metric. The average duration of sessions. screenPageViews | Metric. The total number of page or screen views. screenPageViewsPerSession | Metric. The average number of page or screen views per session. bounceRate | Metric. The percentage of sessions that were not engaged. engagementRate | Metric. The percentage of engaged sessions.

traffic_sources

Where website traffic originates from.

Properties

Name | Description --- | --- date | Dimension. The reporting date for the row. source | Dimension. The source that sent traffic, such as a website or referrer. medium | Dimension. The marketing medium for the traffic source, such as organic, referral, or cpc. sourcePlatform | Dimension. The platform associated with the traffic source. activeUsers | Metric. The number of active users. sessions | Metric. The number of sessions recorded. sessionsPerUser | Metric. The average number of sessions per user. bounceRate | Metric. The percentage of sessions that were not engaged. engagementRate | Metric. The percentage of engaged sessions.

locations

Website activity by country, region, and city.

Properties

Name | Description --- | --- date | Dimension. The reporting date for the row. country | Dimension. The country where the activity originated. countryId | Dimension. The Google Analytics identifier for the country. region | Dimension. The region or state where the activity originated. city | Dimension. The city where the activity originated. cityId | Dimension. The Google Analytics identifier for the city. activeUsers | Metric. The number of active users. newUsers | Metric. The number of first-time users. sessions | Metric. The number of sessions recorded. sessionsPerUser | Metric. The average number of sessions per user. averageSessionDuration | Metric. The average duration of sessions. screenPageViews | Metric. The total number of page or screen views. screenPageViewsPerSession | Metric. The average number of page or screen views per session. bounceRate | Metric. The percentage of sessions that were not engaged. engagementRate | Metric. The percentage of engaged sessions.

four_weekly_active_users

Active users measured over a rolling 28 day period.

Properties

Name | Description --- | --- date | Dimension. The reporting date for the row. active28DayUsers | Metric. The number of active users over the last 28 days.

weekly_active_users

Active users measured over a rolling 7 day period.

Properties

Name | Description --- | --- date | Dimension. The reporting date for the row. active7DayUsers | Metric. The number of active users over the last 7 days.

daily_active_users

Active users measured over a rolling 1 day period.

Properties

Name | Description --- | --- date | Dimension. The reporting date for the row. active1DayUsers | Metric. The number of active users over the last 1 day.

devices

Website activity by device, operating system, and browser.

Properties

Name | Description --- | --- date | Dimension. The reporting date for the row. deviceCategory | Dimension. The type of device used, such as desktop, tablet, or mobile. deviceModel | Dimension. The model of device used by the visitor. operatingSystem | Dimension. The operating system used by the visitor. browser | Dimension. The browser used by the visitor. activeUsers | Metric. The number of active users. newUsers | Metric. The number of first-time users. sessions | Metric. The number of sessions recorded. sessionsPerUser | Metric. The average number of sessions per user. averageSessionDuration | Metric. The average duration of sessions. screenPageViews | Metric. The total number of page or screen views. screenPageViewsPerSession | Metric. The average number of page or screen views per session. bounceRate | Metric. The percentage of sessions that were not engaged. engagementRate | Metric. The percentage of engaged sessions.

transactions

Revenue and transaction performance overview.

Properties

Name | Description --- | --- date | Dimension. The reporting date for the row. activeUsers | Metric. The number of active users. averageRevenuePerUser | Metric. The average revenue generated per user. newUsers | Metric. The number of first-time users. purchaseRevenue | Metric. The revenue generated from purchases. sessions | Metric. The number of sessions recorded. totalRevenue | Metric. The total revenue attributed in the report. transactions | Metric. The number of completed transactions.

pages

Page-level traffic and engagement performance.

Properties

Name | Description --- | --- date | Dimension. The reporting date for the row. hostName | Dimension. The hostname where the page was viewed. pagePath | Dimension. The path portion of the viewed page URL. sessionMedium | Dimension. The session-level marketing medium. sessionSource | Dimension. The session-level traffic source. activeUsers | Metric. The number of active users. bounceRate | Metric. The percentage of sessions that were not engaged. engagedSessions | Metric. The number of engaged sessions. engagementRate | Metric. The percentage of engaged sessions. eventCount | Metric. The total number of tracked events. screenPageViews | Metric. The total number of page or screen views. screenPageViewsPerUser | Metric. The average number of page or screen views per user. screenPageViewsPerSession | Metric. The average number of page or screen views per session. userEngagementDuration | Metric. The amount of time users were actively engaged.

Custom Streams

The tap also supports custom streams. When custom stream definitions are specified, they override all default streams.

Settings

Property ID

Google Analytics Property ID.

To find this in Google Analytics:

  1. Log in to the Analytics dashboard
  2. Select the property
  3. Go to "Admin"
  4. Under "Property", open "Property details"
  5. Copy the "Property ID"

Start Date

The earliest record date to sync

Report definitions file

Google Analytics Reports Definition. The tap uses the default reports definition if this field is not provided. A project-relative path to JSON file with the definition of the reports to be generated.

See https://ga-dev-tools.google/ga4/dimensions-metrics-explorer/ for valid dimensions and metrics.

The JSON structure expected is as follows:

[
  { "name" : "name of stream to be used",
    "dimensions" :
    [
      "Google Analytics Dimension",
      "Another Google Analytics Dimension",
      // ... up to 7 dimensions per stream ...
    ],
    "metrics" :
    [
      "Google Analytics Metric",
      "Another Google Analytics Metric",
      // ... up to 10 metrics per stream ...
    ]
  },
  // ... as many streams / reports as the user wants ...
]

For example, if you want to extract user stats per day in a users_per_day stream and session stats per day and country in a sessions_per_country_day stream:

[
  { "name" : "users_per_day",
    "dimensions" :
    [
      "date"
    ],
    "metrics" :
    [
      "newUsers",
      "active1DayUsers"
    ]
  },
  { "name" : "sessions_per_country_day",
    "dimensions" :
    [
      "date",
      "country"
    ],
    "metrics" :
    [
      "sessions",
      "sessionsPerUser",
      "avgSessionDuration"
    ]
  }
]

Report definitions list

A list of report definitions to be generated directly in the config. Each object in the list defines a report/stream to extract, including the stream name, the Google Analytics dimensions, and the metrics to request.

The JSON structure expected is as follows:

[
  {
    "name": "name of stream to be used",
    "dimensions": [
      "Google Analytics Dimension",
      "Another Google Analytics Dimension"
      // ... up to 7 dimensions per stream ...
    ],
    "metrics": [
      "Google Analytics Metric",
      "Another Google Analytics Metric"
      // ... up to 10 metrics per stream ...
    ]
  }
  // ... as many streams / reports as the user wants ...
]

For example, you can define multiple reports inline like this:

[
  {
    "name": "traffic_overview",
    "dimensions": ["date", "country"],
    "metrics": ["activeUsers", "sessions"]
  },
  {
    "name": "device_analysis",
    "dimensions": ["date", "deviceCategory"],
    "metrics": ["activeUsers", "engagedSessions", "engagementRate"]
  },
  {
    "name": "traffic_source_analysis",
    "dimensions": ["date", "sessionSource", "sessionMedium"],
    "metrics": ["activeUsers", "sessions", "eventCount"]
  },
  {
    "name": "top_pages",
    "dimensions": ["date", "pagePath"],
    "metrics": ["screenPageViews", "activeUsers"]
  },
  {
    "name": "engagement_report",
    "dimensions": ["date"],
    "metrics": ["engagedSessions", "engagementRate", "userEngagementDuration"]
  }
]

End Date

The last record date to sync

Flattening Enabled

'True' to enable schema flattening and automatically expand nested properties.

Flattening Max Depth

The max depth to flatten schemas.

Stream Map Config

User-defined config values to be used within map expressions.

Stream Maps

Config object for stream maps capability. For more information check out Stream Maps.

Meltano Community Connector

Google Analytics connector is available on Meltano Community. It is built by our growing community of over 5000+ developers. Refer to the Install section below to verify the readiness of this connector.

Why Meltano?
Access to Meltano Slack communityJoin 5,500+ data engineers and analytics practitioners. The community is active, helpful, and always on. Good for quick questions, sharing patterns, and learning what others are building.