Ecommerce

Choose your client:

Ecommerce reporting provides insights into the shopping behavior of your users and allows you to quantify your most popular products and see how promotions and product placement affect revenues.

This guide outlines how to measure user interactions with products on ecommerce sites.

Average purchase revenue per user and purchases by item name
Example report: Average purchase revenue per user and purchases by item name.

Before you begin

Review the following to learn more about how ecommerce implementation and reporting works with Google Analytics 4.

Required vs optional ecommerce data

To improve the functionality of ecommerce reports, the following is recommended:

  1. Set each ecommerce parameter for which you have available data, regardless of whether the parameter is optional.
  2. Refer to Google Analytics 4 Events to review event parameter requirements and behavior for each ecommerce event you send.
  3. Set currency when sending value (revenue) data to ensure revenue metrics can be calculated correctly.

Custom parameters and item limits

  • If needed, custom parameters can be sent with ecommerce events. Custom dimensions and metrics limits will apply.
  • The items array for any ecommerce event can include up to 200 elements.

Reporting

Ecommerce data is available through the following interfaces, each with varying levels of capabilities to provide insights into the shopping behavior of your users:

Product views and interactions

Measuring product views and interactions provides insights on how often products are shown, viewed, and selected by users. Combined with promotion data the following events can also help you measure the effectiveness of campaigns:

view_item_list

Send when a user is shown a list of items/offerings.

See the view_item_list reference for details on parameter requirements and behaviors.

Example

A user visits a page and is shown a Related Products list.

view_item

Send when a user is shown one specific item/offering.

See the view_item reference for details on parameter requirements and behaviors.

Example

A user views a product page.

See the view_item reference for details on parameter requirements and behaviors.

select_item

Send when a user selects an item from a list.

See the select_item reference for details on parameter requirements and behaviors.

Example

A user clicks a product link from a Related products list.

Promotion views and interactions

Measuring promotion views and interactions provides insights on how often promotions are shown, viewed, and selected by users. Combined with product data, the following events can also help you measure the effectiveness of campaigns:

view_promotion

Send when a user is shown one specific promotion.

See the view_promotion reference for details on parameter requirements and behaviors.

Example

A user views a page with a banner promoting a sale.

select_promotion

Send when a user selects a promotion.

See the select_promotion reference for details on parameter requirements and behaviors.

Example

A user clicks on a banner promoting a sale.

Pre-purchase interactions

To measure user behavior before checkout and gain insights on item performance, send the following events:

add_to_wishlist

Send when a user adds an item to their wishlist.

See the add_to_wishlist reference for details on parameter requirements and behaviors.

Example

add_to_cart

Send when a user adds an item to their cart.

See the add_to_cart reference for details on parameter requirements and behaviors.

Example

remove_from_cart

Send when a user removes an item from their cart.

See the remove_from_cart reference for details on parameter requirements and behaviors.

Example

view_cart

Send when a user views their cart.

See the view_cart reference for details on parameter requirements and behaviors.

Example

Purchases, checkouts, and refunds

To measure product purchases and gain insights on item performance, send the following events:

begin_checkout

Send when a user starts the checkout process.

See the begin_checkout reference for details on parameter requirements and behaviors.

Example

add_payment_info

Send when a user adds their payment info during the checkout process.

See the add_payment_info reference for details on parameter requirements and behaviors.

Example

add_shipping_info

Send when a user adds their shipping information during the checkout process.

See the add_shipping_info reference for details on parameter requirements and behaviors.

Example

purchase

Send when a user completes the purchase process.

See the purchase reference for details on parameter requirements and behaviors.

Example

refund

Send when a user requests a refund.

The are two supported types of refunds:

  1. Partial - When only some of the purchased items are refunded.
  2. Full - When all of the purchased items are refunded.

See the refund reference for details on parameter requirements and behaviors.

Partial refund example

Full refund example