Metrics

Google Analytics metrics via API

Your customer connects their Google Analytics account and your product queries 56 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:all_sessions",
      "component": "number_v1",
      "metrics": [
        "ga:sessions"
      ]
    }
  ]
}
Example: "Sessions" in October, compared to September.

More Google Analytics 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:gender",
      "component": "chart_v1",
      "metrics": [
        "ga:users"
      ],
      "dimensions": [
        "ga:userGender"
      ]
    }
  ]
}

Table

Traffic Source

Kinds of sources that sent traffic to your website.

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:content_sources",
      "component": "datatable_v1",
      "metrics": [
        "ga:sessions",
        "ga:newUsers",
        "ga:percentNewSessions"
      ],
      "dimensions": [
        "ga:source",
        "ga:medium"
      ]
    }
  ]
}

Number

Users

Number of users that visited the page.

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:all_users",
      "component": "number_v1",
      "metrics": [
        "ga:users"
      ]
    }
  ]
}

Numbers

43 metrics

  • Sessions

    A session is a group of user interactions with your website that take place within a given time frame. For example a single session can contain multiple page views, events, social interactions, and ecommerce transactions.

    google_analytics:all_sessions
  • Users

    Number of users that visited the page.

    google_analytics:all_users
  • Pageviews

    Number of pageviews on the page.

    google_analytics:all_pageviews
  • Pages per visit

    The average number of pages viewed during a session, including repeated views of a single page.

    google_analytics:pageview_session
  • Average session time

    Total duration (in seconds of users' sessions.

    google_analytics:session_duration
  • Time on page

    Time (in seconds that user spent in the page.

    google_analytics:average_time_on_page
  • Bounce rate

    The percentage of single-page session (i.e., session in which the person left the website from the first page.

    google_analytics:bounce_rate
  • New sessions

    The percentage of sessions by users who had never visited the website before.

    google_analytics:percent_new_sessions
  • Ecommerce Conversion Rate

    The percentage of Sessions (site visits that result in purchases

    google_analytics:conversion_rate
  • Revenue

    The total sale revenue.

    google_analytics:revenue
  • Average Order Value

    The average revenue of an ecommerce transaction.

    google_analytics:revenue_per_transaction
  • Unique purchases

    The number of product sets purchased. For example, if users purchase 2 shirts and 1 coat, this will be 2.

    google_analytics:unique_purchases
  • Transactions

    Total number of purchases made through the site.

    google_analytics:transactions
  • Sessions to Transaction

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

    google_analytics:sessions_to_transaction
  • Buy-to-Detail Rate

    Unique purchases divided by views of product detail pages

    google_analytics:buy_to_detail_rate
  • Cart-to-Detail Rate

    Product adds divided by views of product details

    google_analytics:cart_to_detail_rate
  • Quantity Added To Cart

    Number of product units added to the shopping cart

    google_analytics:quantity_added_to_cart
  • Quantity Checked Out

    Number of product units included in check out

    google_analytics:quantity_checked_out
  • Quantity Removed From Cart

    Number of product units removed from a shopping cart

    google_analytics:quantity_removed_from_cart
  • Goal 1 Completions

    The total number of completions for goal.

    google_analytics:goal_01_completions
  • Goal 2 Completions

    The total number of completions for goal.

    google_analytics:goal_02_completions
  • Goal 3 Completions

    The total number of completions for goal.

    google_analytics:goal_03_completions
  • Goal 4 Completions

    The total number of completions for goal.

    google_analytics:goal_04_completions
  • Goal 5 Completions

    The total number of completions for goal.

    google_analytics:goal_05_completions
  • Goal 6 Completions

    The total number of completions for goal.

    google_analytics:goal_06_completions
  • Goal 7 Completions

    The total number of completions for goal.

    google_analytics:goal_07_completions
  • Goal 8 Completions

    The total number of completions for goal.

    google_analytics:goal_08_completions
  • Goal 9 Completions

    The total number of completions for goal.

    google_analytics:goal_09_completions
  • Goal 10 Completions

    The total number of completions for goal.

    google_analytics:goal_10_completions
  • Goal 11 Completions

    The total number of completions for goal.

    google_analytics:goal_11_completions
  • Goal 12 Completions

    The total number of completions for goal.

    google_analytics:goal_12_completions
  • Goal 13 Completions

    The total number of completions for goal.

    google_analytics:goal_13_completions
  • Goal 14 Completions

    The total number of completions for goal.

    google_analytics:goal_14_completions
  • Goal 15 Completions

    The total number of completions for goal.

    google_analytics:goal_15_completions
  • Goal 16 Completions

    The total number of completions for goal.

    google_analytics:goal_16_completions
  • Goal 17 Completions

    The total number of completions for goal.

    google_analytics:goal_17_completions
  • Goal 18 Completions

    The total number of completions for goal.

    google_analytics:goal_18_completions
  • Goal 19 Completions

    The total number of completions for goal.

    google_analytics:goal_19_completions
  • Goal 20 Completions

    The total number of completions for goal.

    google_analytics:goal_20_completions
  • Goal Completions

    Total number of completions for all goals defined in the profile

    google_analytics:goal_completions
  • Goal Value

    Total amount produced by goal conversions on your site. This value is calculated by multiplying the number of goal conversions by the value assigned to each goal.

    google_analytics:goal_value
  • Goal Conversion Rate

    The sum of all individual goals conversion rates.

    google_analytics:goal_conversion_rate
  • Total Abandonment Rate

    The percentage of abandonment of the objectives. Defined as the total number of abandoned funnels divided by the total number of goal starts.

    google_analytics:total _abandonment _rate

Charts

4 metrics

  • Visitors gender

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

    google_analytics:gender
  • Sessions by age

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

    google_analytics:age
  • Visits per day

    Total number of pageviews on the page over time.

    google_analytics:pageviews_per_day
  • Goal Completions over time

    Total number of completions for all goals defined in the profile over time.

    google_analytics:goal_completions_over_time

Tables

9 metrics

  • Traffic Source

    Kinds of sources that sent traffic to your website.

    google_analytics:content_sources
  • Most accessed pages

    Pages with the most number accesses.

    google_analytics:top_content
  • Featured countries

    Countries with the highest number of sessions.

    google_analytics:countries
  • Featured cities

    Cities with the highest number of sessions.

    google_analytics:cities
  • Product Performance

    Performance summary of your product list during the analyzed period.

    google_analytics:product_performance
  • Revenue by City

    Performance of cities with the highest revenue

    google_analytics:revenue_by_city
  • Featured Channels

    Channels with higher revenue

    google_analytics:featured_channels
  • Goal Completion Location

    URL where goal completions occurred.

    google_analytics:goal_completion_location
  • Source/Medium of goal completions

    The combinations of sources that generated traffic. It includes the sources and media identified through utm_source and utm_medium.

    google_analytics:goal_source_medium

See Connect applied to your product.

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