Metrics

Google Analytics 4 metrics via API

Your customer connects their Google Analytics 4 account and your product queries 95 metrics through the same endpoint as every other platform. Each metric has an id (reference_key) that goes in the request.

POST /api/metrics/get-data
Authorization: Bearer <merchant token>
x-customer-token: <customer token>

{
  "customer_integration": "<connection uuid>",
  "start": "2026-10-01",
  "end": "2026-10-31",
  "comparison_start": "2026-09-01",
  "comparison_end": "2026-09-30",
  "metrics": [
    {
      "id": "m1",
      "reference_key": "google_analytics_4:all_sessions",
      "component": "number_v1",
      "metrics": [
        "sessions"
      ]
    }
  ]
}
Example: "Sessions" in October, compared to September.

More Google Analytics 4 request examples

The same endpoint for every kind of metric. The metrics and dimensions of each item come from the platform catalog (GET /api/metrics/{integration_slug}).

Chart

Visitors gender

This chart shows the number of visitors, grouped by gender.

POST /api/metrics/get-data
Authorization: Bearer <merchant token>
x-customer-token: <customer token>

{
  "customer_integration": "<connection uuid>",
  "start": "2026-10-01",
  "end": "2026-10-31",
  "metrics": [
    {
      "id": "m1",
      "reference_key": "google_analytics_4:gender",
      "component": "chart_v1",
      "metrics": [
        "totalUsers"
      ],
      "dimensions": [
        "userGender"
      ]
    }
  ]
}

Table

Featured countries

Countries with the highest number of sessions during the analyzed period.

POST /api/metrics/get-data
Authorization: Bearer <merchant token>
x-customer-token: <customer token>

{
  "customer_integration": "<connection uuid>",
  "start": "2026-10-01",
  "end": "2026-10-31",
  "metrics": [
    {
      "id": "m1",
      "reference_key": "google_analytics_4:countries",
      "component": "datatable_v1",
      "metrics": [
        "engagedSessions",
        "activeUsers"
      ],
      "dimensions": [
        "country"
      ]
    }
  ]
}

Number

View Products

Number of users who viewed an item.

POST /api/metrics/get-data
Authorization: Bearer <merchant token>
x-customer-token: <customer token>

{
  "customer_integration": "<connection uuid>",
  "start": "2026-10-01",
  "end": "2026-10-31",
  "metrics": [
    {
      "id": "m1",
      "reference_key": "google_analytics_4:view_product",
      "component": "number_v1",
      "metrics": [
        "itemViewEvents"
      ]
    }
  ]
}

Numbers

52 metrics

  • Sessions

    This is the total number of unique users who logged an event. A Session is a group of user interactions with your website that occurred within a given period of time. For example, a single session can contain multiple page views, events, social interactions, and ecommerce transactions.

    google_analytics_4:all_sessions
  • View Products

    Number of users who viewed an item.

    google_analytics_4:view_product
  • Abandoned Carts

    Number of times visitors added products to their shopping cart during a session but did not complete the transaction, abandoning the purchase process before completing it.

    google_analytics_4:abandoned_carts
  • Active Users

    The total number of active users who interacted with your website or app during the analysis period.

    google_analytics_4:all_users
  • Returning Users

    The number of users who have had one or more previous sessions on your website or app during the analysis period.

    google_analytics_4:returning_users
  • Total users

    This is the total number of unique users who recorded at least one event during the analysis period. This metric is estimated by the network.

    google_analytics_4:total_users
  • New users

    The number of Users who interacted with your Site or launched your App for the first time during the specified Date Range.

    google_analytics_4:new_users
  • Views

    Total number of pages viewed during the analyzed period. Repeat views of a single page are counted.

    google_analytics_4:all_pageviews
  • Views per active user

    Average number of pages visited per active user in the selected period. It is the division of Views by the number of active users.

    google_analytics_4:all_pageviews_per_active_user
  • Views per session

    Average number of pages visited per session, including repeat visits to the same page. It is the division of Views by the number of sessions.

    google_analytics_4:pageview_session
  • Event Count

    Number of times users triggered the events during the selected period. An event allows you to measure a specific user interaction on websites or apps, such as loading a page, clicking a link, and completing a purchase

    google_analytics_4:event_count
  • Event Count per active user

    Average number of events triggered per active user in the selected period. It is the division of Event Count by the number of active users.

    google_analytics_4:event_count_per_active_user
  • User key event rate per active user

    Percentage of active users who triggered the key event during the selected period. It is the division of the number of users who triggered the key event by the number of active users.

    google_analytics_4:user_key_event_rate_per_active_user
  • Session key event rate

    Percentage of sessions that triggered the key event during the selected period. It is the division of the number of sessions that triggered the key event by the number of sessions.

    google_analytics_4:session_key_event_rate
  • New buyers

    Number of users who completed the first purchase event.

    google_analytics_4:first_time_purchasers
  • Total buyers

    Total number of users who registered purchase events during the analysis period.

    google_analytics_4:total_purchasers
  • Ecommerce Conversion Rate

    The percentage of Sessions (site visits) that result in purchases

    google_analytics_4:conversion_rate
  • Sessions to Transaction

    The number of sessions between users' purchases and the related campaigns that lead to the purchases.

    google_analytics_4:sessions_to_transaction
  • Main Event

    Number of times users trigger main events during the analyzed period.

    google_analytics_4:conversions_count
  • Transactions

    Total number of purchases made through the site.

    google_analytics_4:transactions_count
  • Quantity Added To Cart

    The number of times users added items to their shopping carts during the analysis period.

    google_analytics_4:quantity_added_to_cart
  • Purchases initiated

    Number of times users initiated the checkout process.

    google_analytics_4:quantity_checked_out
  • Ecommerce purchases

    The total number of purchases on your website or app during the reporting period.

    google_analytics_4:ecommerce_purchase_amount
  • Average Purchase Revenue

    The average Purchase Revenue in the Transaction Group of Events during the specified Date Range.

    google_analytics_4:average_purchase_revenue
  • Items Purchased

    The total number of items purchased during the reporting period.

    google_analytics_4:items_purchased
  • Engagement Rate

    The percentage of engaged sessions. Sessions where the user was active for more than 10 seconds, accessed at least two pages or screens, or performed some conversion during the specified review period. The calculation is performed by dividing the number of Engaged Sessions divided by Sessions.

    google_analytics_4:engagement_rate
  • Average Engagement Time per Total User

    Average engagement time per total user in the selected period.

    google_analytics_4:average_engagement_time
  • Average Engagement Time per Active User

    Average engagement time per active user in the selected period.

    google_analytics_4:average_engagement_time_per_active_user
  • Average Engagement Time Per Sessions

    Average interaction time per sessions, during the analysis period.

    google_analytics_4:average_engagement_time_per_sessions
  • Engaged Sessions

    The number of Sessions that lasted longer than 10 seconds, or had a Conversion Event, or had 2 or more screen Views during the specified Date Range.

    google_analytics_4:engaged_sessions
  • Event Value

    Total value of events during the analysis period

    google_analytics_4:event_value
  • Total revenue

    The sum of purchase, subscription, and advertising revenue.

    google_analytics_4:total_revenue
  • ARPPU

    Average revenue per paying user is the total purchase revenue per active user that logged a purchase event, during the analysis period.

    google_analytics_4:average_revenue_per_paying_user
  • ARPU

    Average revenue per active user (ARPU), during the period analyzed. ARPU includes AdMob estimated earnings.

    google_analytics_4:average_revenue_per_user
  • Total Advertising Revenue

    Total revenue from advertisements served during the analysis period

    google_analytics_4:total_advertising_revenue
  • Organic traffic

    Number of sessions by organic channel group

    google_analytics_4:sessions_by_organic_channel_group
  • Paid traffic

    Number of sessions by paid channel group

    google_analytics_4:sessions_by_paid_channel_group
  • Direct traffic

    Number of sessions by direct channel group

    google_analytics_4:sessions_by_direct_channel_group
  • Organic active users

    Number of active users by organic channel group

    google_analytics_4:active_users_by_organic_channel_group
  • Paid active users

    Number of active users by paid channel group

    google_analytics_4:active_users_by_paid_channel_group
  • Direct active users

    Number of active users by direct channel group

    google_analytics_4:active_users_by_direct_channel_group
  • Organic engagement rate

    Engagement rate by organic channel group

    google_analytics_4:engagement_rate_by_organic_channel_group
  • Paid engagement rate

    Engagement rate by paid channel group

    google_analytics_4:engagement_rate_by_paid_channel_group
  • Direct engagement rate

    Engagement rate by direct channel group

    google_analytics_4:engagement_rate_by_direct_channel_group
  • Organic engaged sessions

    Number of engaged sessions by organic channel group

    google_analytics_4:engaged_sessions_by_organic_channel_group
  • Paid engaged sessions

    Number of engaged sessions by paid channel group

    google_analytics_4:engaged_sessions_by_paid_channel_group
  • Direct engaged sessions

    Number of engaged sessions by direct channel group

    google_analytics_4:engaged_sessions_by_direct_channel_group
  • Purchase Revenue

    Total revenue from purchase events, including taxes and shipping.

    google_analytics_4:ecommerce_purchase_revenue
  • Gross Purchase Revenue

    Total gross revenue from purchase events, including taxes and shipping.

    google_analytics_4:gross_ecommerce_purchase_revenue
  • Cart-to-View Rate

    Product adds divided by views of product details

    google_analytics_4:cart_to_view_rate
  • Bounce Rate

    Percentage of unengaged sessions. Sessions are considered engaged if they are: more than 10 seconds long, at least 1 conversion event or 2 page views/screen views. Bounce rate is calculated by dividing the number of unengaged sessions by the total number of sessions.

    google_analytics_4:bounce_rate
  • ROAS

    Return on advertising spend (ROAS) is total revenue divided by the advertiser's advertising cost.

    google_analytics_4:return_on_ad_spend

Charts

10 metrics

  • Visitors gender

    This chart shows the number of visitors, grouped by gender.

    google_analytics_4:gender
  • Sessions by age

    Amount of sessions and users based on the age of the visitor.

    google_analytics_4:age
  • Sessions by session default channel group

    Number of sessions grouped by the channels users used to access the website/app when they started sessions.

    google_analytics_4:sessions_by_session_default_channel_group_chart
  • Active users by session default channel group over time

    Number of active users, segmented by default session channel group, over the analyzed period.

    google_analytics_4:users_per_session_default_channel_group_over_time
  • Bounce Rate over time

    This graph shows the evolution of the bounce rate (percentage of unengaged sessions) over the analysis period.

    google_analytics_4:bounce_rate_chart
  • Average Engagement Time per Active User

    This graph shows the average interaction time per active user over the analysis period.

    google_analytics_4:average_engagement_time_chart
  • Active users by device

    Number of active users on your website or app based on the different types of devices used, such as desktops, smartphones, and tablets.

    google_analytics_4:users_by_device
  • Sessions by devices

    Number of sessions on your website or app based on the different types of devices used, such as desktops, smartphones and tablets.

    google_analytics_4:sessions_by_device
  • Users over time

    Number of users over time

    google_analytics_4:users_over_time
  • Event over time

    This graph shows the evolution of the number of events for each of the registered events over time.

    google_analytics_4:event_count_over_time

Tables

33 metrics

  • Featured countries

    Countries with the highest number of sessions during the analyzed period.

    google_analytics_4:countries
  • Products performance

    Summary of interactions with the products or services offered on your website or app during the selected analysis period.

    google_analytics_4:top_products_sold
  • First User Campaign

    This table provides a summary of user acquisition data through the first user campaign in GA4.

    google_analytics_4:first_user_campaign_name
  • Google Ads keyword text

    Performance summary of the Google Ads keywords that led to the key event during the analyzed period.

    google_analytics_4:google_ads_keyword
  • Session Google Ads keyword

    Performance summary of the Google Ads keywords that led to a session during the analyzed period.

    google_analytics_4:session_google_ads_keyword
  • Session default channel group

    This table shows the performance of each of the channels that users used to access the website/app when they started sessions

    google_analytics_4:session_default_channel_group_datatable
  • First user primary channel group

    This table shows the performance of each of the channels that users used to access the website/app when they started sessions

    google_analytics_4:first_user_primary_channel_group
  • Campaign Results

    Results about marketing campaigns of a session. Includes Google Ads campaigns, manuals and others.

    google_analytics_4:campaign_results
  • Purchase Journey: Device Category

    This table shows how users are progressing through the purchase funnel on your ecommerce website or app, based on their device category. The device category is the type of device the user's activity originated on. Device categories include desktop, mobile, and tablet.

    google_analytics_4:device_category
  • Google Organic Search Traffic

    The Google Organic Search Traffic table is a pre-built, detailed report that shows landing pages with associated Search Console and Google Analytics metrics for the linked Search Console property.

    google_analytics_4:organic_search_traffic
  • Landing Page

    This table shows the performance of each landing page, segmented by the source of the traffic.

    google_analytics_4:landing_page
  • Session Default Channel Group by Campaigns

    This table provides information about where your traffic comes from (e.g., Google, Baidu, Bing) and the respective mediums that drive users to your site or app (e.g., organic search results, email, and CPC).

    google_analytics_4:top_campaigns
  • Events by First User Campaign

    This table provides a summary of the performance of each event, segmented by the campaign assigned to the first user.

    google_analytics_4:event_conversion_first_user_campaign_name
  • Events by first user manual ad content

    This table provides a summary of the performance of each event, segmented by the content of the manual ad associated with the first user.

    google_analytics_4:event_conversion_first_user_ad_content
  • Events by first user manual term

    This table presents a summary of the performance of each event, segmented by the manual term assigned to the first user.

    google_analytics_4:event_conversion_first_user_ad_name
  • Events by session source

    This table provides a summary of the performance of each event, segmented by session source.

    google_analytics_4:event_conversion_by_session_source
  • Events by media assigned to the first user

    This table presents a summary of the performance of each event, segmented by the media attributed to the first user.

    google_analytics_4:event_conversion_first_user_ad_medium
  • Google Ads campaign performance

    This table provides a summary of the performance of Google Ads campaigns and shows whether they are generating traffic and conversions for your website or app.

    google_analytics_4:google_ads_campaign
  • Featured cities

    Cities with the highest number of sessions during the analyzed period.

    google_analytics_4:cities
  • Most accessed pages

    Pages with the most number accesses.

    google_analytics_4:top_content
  • Session origin and media

    This table provides information about where your traffic comes from (e.g., Google, Baidu, Bing) and the respective mediums that drive users to your site or app (e.g., organic search results, email, and CPC).

    google_analytics_4:content_sources
  • Events by session source/medium

    This table provides a summary of the performance of each event, segmented by session source/medium.

    google_analytics_4:conversion_events_by_session_medium
  • Source/medium per event

    This table provides a summary of the performance of conversion events, grouped by source/medium.

    google_analytics_4:media_source_by_event
  • Summary of events

    This table shows the main results of the events registered on your website or app.

    google_analytics_4:top_events
  • Summary of main events

    This table provides a summary of the events that were marked as main events.

    google_analytics_4:top_conversions
  • Main origins of the sessions

    Origin of the sessions that had the best performances during the period of analysis.

    google_analytics_4:featured_channels
  • Session source platform

    Platform that originated the sessions that had the best performances during the period of analysis.

    google_analytics_4:session_source_platform
  • UTM Source

    This table provides a summary of the performance of UTM sources.

    google_analytics_4:utm_source
  • UTM Medium

    This table provides a summary of the performance of UTM mediums.

    google_analytics_4:utm_medium
  • UTM Campaign

    This table provides a summary of the performance of UTM campaigns.

    google_analytics_4:utm_campaignName
  • UTM Manual Ad Content

    This table provides a summary of the performance of UTM manual ad content.

    google_analytics_4:utm_manualAdContent
  • UTM Term

    This table provides a summary of the performance of UTM terms.

    google_analytics_4:utm_manualTerm
  • Views by page title and screen class

    This table provides data on the pages users visit on a website and the screens people open on a mobile app.

    google_analytics_4:screen_page_views

See Connect applied to your product.

Try it for 15 days with no card, or walk our team through your use case.