How to Link GA4 Client ID to eCommerce Product Data in a Report

How can I create a client ID report in Google Analytics?


Hi there,
under Audience > User Explorer there is a user report for the client id.ย 

How can I create a report in which the client id states the action type, product code and product name?

Ta Hollie
Details
Reporting

The short answer is:

How can I combine a Client ID with product data in a standard Google Analytics 4 report?

You cannot create this combined report directly in the standard Google Analytics 4 (GA4) user interface because the Client ID is a User-scoped dimension, while product details (like product code and name) are Item-scoped parameters within an event, and native GA4 reports do not easily join these different scopes.

The technical, actionable solution is to leverage the BigQuery API to export your raw GA4 event data, which inherently contains both the client_id (accessible via the user_pseudo_id field for unauthenticated users) and the full eCommerce item array.

Once in BigQuery, you can use standard SQL to unnest the product array and join the Client ID with the specific action type (event name like add_to_cart or purchase), product code (item_id), and product name (item_name) for a comprehensive, granular analysis.

This API-driven approach is highly cost-effective, especially for properties under the GA4 free tier, as BigQuery export is complimentary, and you only pay for the queries you run, solving the immediate reporting limitation and providing a future-proof, unified data source.

The long answer is:

Your requirement to link a unique Client ID to specific eCommerce product data like action type, product code, and product name necessitates a shift from the Google Analytics 4 reporting interface to its raw data export capabilities, primarily utilizing the BigQuery API.

The fundamental technical challenge lies in the data model of GA4: the Client ID (which is exposed in BigQuery as user_pseudo_id for web data streams) is a user-level identifier, while the product details are contained within the items array parameter of an eCommerce event (like view_item or purchase), making them Item-scoped event data.

The standard GA4 reports and explorations are designed to aggregate data, which prevents the direct, row-level correlation you need.

The most robust and cost-effective solution is to enable the free-of-charge BigQuery Export from your GA4 property, which streams the raw, unsampled event data directly into Google Cloud Platform (GCP).

Once the data resides in BigQuery, you can interact with it programmatically using the BigQuery API or via the BigQuery console.

The data is structured in daily tables where each row represents a single event.

Within the event data, the user_pseudo_id is the key field that corresponds to the web Client ID, and all eCommerce events contain a nested and repeated field called items.

To generate your desired report, you will write a SQL query that performs an UNNEST operation on the items array for relevant eCommerce events.

This unnesting flattens the product array, creating a new row for every product within an event, but critically, it retains the parent event’s context, including the user_pseudo_id (Client ID) and the event name (the “action type”).

The product code and product name are accessed directly from the unnested item struct as item.item_id and item.item_name.

This method directly solves your problem by creating a unified, denormalized table linking the user to every product interaction.

Furthermore, integrating Looker Studio via its native BigQuery connector can provide a dynamic, custom visualization layer over your BigQuery data, enabling your team to interact with this highly granular report without writing SQL every time.

This approach is highly cost-effective because the primary resource cost is only incurred for the data processed when you run a query, which is typically minimal compared to the licensing costs of third-party data warehousing or reporting tools.

About The Author