E-Commerce Analytics Guide
Google Analytics 4 (GA4) events help online store owners understand how shoppers interact with products, use shopping carts, navigate checkout, and complete purchases. Unlike a measurement strategy focused only on page views, event-based analytics provides a more detailed picture of the customer journey.
view_item,
add_to_cart, view_cart,
begin_checkout, and purchase.
Additional events measure product-list interactions, shipping and
payment steps, refunds, promotions, searches, and customer engagement.
This guide explains the GA4 event categories, provides a practical reference list for e-commerce websites, and shows how to implement and validate events using Google Tag Manager or a platform integration. It covers Shopify, WooCommerce, and custom-built online stores.
1. What Are GA4 Events?
In GA4, an event represents an interaction or occurrence measured on a website or app. A page view, a product selection, a search, a checkout start, and a completed purchase can all be recorded as events.
Each event has a name and can include parameters that provide
additional context. For example, a purchase event
can contain a transaction ID, currency, total value, and an array
of purchased items.
How an event works
- A shopper performs an action on the online store.
- The website or commerce integration detects the action.
- The implementation sends an event and its parameters to GA4.
- GA4 processes the data for eligible reports and analysis.
For example, when a customer adds a pair of shoes to a shopping cart,
the website can send add_to_cart along with the item ID,
product name, price, quantity, currency, and event value.
Correct event implementation matters because inaccurate or duplicated events can distort conversion funnels, product performance reports, and revenue analysis.
2. The Main Types of GA4 Events
GA4 events are commonly grouped into four categories. Understanding the differences helps determine which events require custom implementation and which may already be collected automatically.
Automatically collected events
GA4 collects certain events automatically after the Google tag or
supported SDK is installed. These can include
first_visit, session_start, and
user_engagement, depending on the platform and setup.
Enhanced measurement events
Enhanced measurement can collect selected interactions without
requiring a separate manual event configuration for each one.
Depending on the settings and implementation, these may include
scroll, click,
file_download, and view_search_results.
Recommended events
Google provides recommended event names for specific use cases,
including e-commerce. Events such as add_to_cart,
begin_checkout, and purchase should use
the recommended names and parameters to support standard reporting.
Custom events
Custom events measure interactions that do not fit an existing recommended event. An online store might use a custom event for a specialized product configurator or a proprietary shopping interaction.
Before creating a custom event, check whether GA4 already has an appropriate recommended event. Standardized names generally make reporting and integrations easier.
3. The Complete GA4 E-Commerce Event List
The following reference covers the principal recommended e-commerce events and related interactions that an online store may want to measure. Use the search field and category filters to find an event.
Showing all events
| Event name | Category | When to use it | Key parameters |
|---|---|---|---|
view_item_list |
Product discovery | A shopper views a category, collection, or product list. | item_list_id, item_list_name, items |
select_item |
Product discovery | A shopper selects a product from a list. | item_list_name, items |
view_item |
Product discovery | A shopper views a product detail page. | currency, value, items |
add_to_cart |
Shopping cart | A product is successfully added to the cart. | currency, value, items |
remove_from_cart |
Shopping cart | A product is removed from the cart. | currency, value, items |
view_cart |
Shopping cart | A shopper views the shopping cart. | currency, value, items |
begin_checkout |
Checkout | A shopper starts the checkout process. | currency, value, items, coupon |
add_shipping_info |
Checkout | A shopper submits shipping information. | shipping_tier, currency, value, items |
add_payment_info |
Checkout | A shopper submits payment information. | payment_type, currency, value, items |
purchase |
Transactions | An order is completed and confirmed. | transaction_id, value, currency, items |
refund |
Transactions | A full or partial refund is recorded. | transaction_id, value, currency, items |
view_promotion |
Promotions | A promotional placement is viewed. | promotion_id, promotion_name, items |
select_promotion |
Promotions | A shopper selects a promotional placement. | promotion_id, promotion_name, items |
view_search_results |
Search | A site search produces a results page, when configured. | Search term and relevant page parameters |
search |
Search | A user performs a search in an implementation that sends this event. | search_term |
This is a practical reference, not a claim that every event is automatically collected. Search tracking depends on the implementation. Product, cart, checkout, promotion, purchase, and refund events usually require an appropriate commerce integration or explicit configuration.
Which e-commerce events should you implement first?
If you are building analytics for a new online store, start with the events that measure the main conversion journey:
view_itemto measure product detail views.add_to_cartto measure shopping intent.begin_checkoutto measure checkout initiation.purchaseto measure completed transactions.
Then add view_item_list, select_item,
view_cart, shipping and payment events, promotion events,
and refund to build a more detailed view of customer
behavior.
4. Other Useful GA4 Events for Online Stores
E-commerce events explain shopping activity, but general GA4 events help describe how users arrive at and interact with the website.
| Event | What it measures | Why it matters |
|---|---|---|
page_view |
A page is viewed. | Measures page-level traffic and navigation. |
session_start |
A new session begins. | Provides session context for acquisition analysis. |
first_visit |
A user visits the website for the first time on that browser or device. | Helps analyze new visitor activity. |
user_engagement |
Records engagement activity under GA4’s measurement rules. | Helps evaluate engaged visits. |
scroll |
Measures an eligible scroll interaction when enhanced measurement is enabled. | Offers a basic content engagement signal. |
click |
Measures eligible outbound link clicks through enhanced measurement. | Helps evaluate traffic leaving for external destinations. |
file_download |
Measures eligible file download interactions. | Useful for catalogs, manuals, and product specification sheets. |
login |
A user signs in when the implementation sends this recommended event. | Can help analyze authenticated customer behavior. |
sign_up |
A user completes an account registration when implemented. | Measures account creation. |
generate_lead |
A user generates a lead. | Useful for quote requests or business-to-business sales journeys. |
Event availability depends on the tag, platform, and configuration. For example, enhanced measurement can record some interactions automatically, while account creation and login usually need deliberate implementation.
5. Important GA4 E-Commerce Event Parameters
Event names describe what happened. Parameters explain the context. For e-commerce tracking, item and transaction parameters are especially important.
| Parameter | Purpose | Example |
|---|---|---|
items |
Array containing product or service details. | An array of purchased products. |
item_id |
Identifies a product or item. | SKU-1001 |
item_name |
Product name. | Running Shoes |
price |
Price of an item, using a consistent implementation. | 59.99 |
quantity |
Quantity of the item. | 2 |
currency |
Three-letter currency code. | USD |
value |
Monetary value associated with the event. | 119.98 |
transaction_id |
Unique transaction identifier for a purchase. | ORDER-12345 |
coupon |
Coupon code associated with an eligible event or item. | SUMMER10 |
shipping |
Shipping amount associated with the transaction. | 5.99 |
tax |
Tax amount associated with the transaction. | 8.50 |
Use the parameter definitions in Google’s current GA4 documentation.
In particular, ensure that value, item prices, taxes,
shipping, discounts, and refunds are handled consistently with the
store’s financial and reporting requirements.
6. How to Implement GA4 Events
Method 1: Use Google Tag Manager
Google Tag Manager lets you configure GA4 event tags, triggers, and variables without manually adding a separate tracking script for every interaction.
- Install the GTM container on your website.
- Configure the Google tag with the correct GA4 Measurement ID.
- Make the store’s event data available through the data layer.
- Create event triggers for the interactions you want to measure.
- Configure GA4 event tags to pass the correct event parameters.
- Test the setup in Preview mode before publishing.
Method 2: Use a platform integration
An integration or analytics plugin may automatically send some e-commerce events. Review the integration’s documentation and verify that it provides the events and parameters your store needs.
Avoid installing overlapping tracking solutions without checking whether they send the same events. Duplicate implementations can inflate counts and distort reports.
Method 3: Use a custom data layer
Developers can push event information to dataLayer when
a real user interaction occurs. Google Tag Manager can then process
those events and send them to GA4.
This approach offers flexibility, but requires careful implementation of product data, checkout transitions, transaction values, and duplicate-event prevention.
7. GA4 Event Code Examples for Online Stores
The following snippets demonstrate how a website can push recommended e-commerce events to the Google Tag Manager data layer. They are examples, not a complete plug-and-play tracking installation.
Example 1: Track an add-to-cart event
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: "add_to_cart",
ecommerce: {
currency: "USD",
value: 59.99,
items: [
{
item_id: "SKU-1001",
item_name: "Running Shoes",
price: 59.99,
quantity: 1
}
]
}
});
Trigger this event after the product has actually been added to the cart. Configure a corresponding GA4 event tag in GTM to send the event name and parameters.
Example 2: Track the start of checkout
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: "begin_checkout",
ecommerce: {
currency: "USD",
value: 119.98,
items: [
{
item_id: "SKU-1001",
item_name: "Running Shoes",
price: 59.99,
quantity: 2
}
]
}
});
Fire begin_checkout when the shopper starts the checkout
process, not simply when a cart page is viewed.
Example 3: Track a completed purchase
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: "purchase",
ecommerce: {
transaction_id: "ORDER-12345",
value: 119.98,
currency: "USD",
shipping: 5.99,
tax: 8.50,
items: [
{
item_id: "SKU-1001",
item_name: "Running Shoes",
price: 59.99,
quantity: 2
}
]
}
});
A production implementation must populate the event using real order data and Google’s recommended parameter definitions. This sample illustrates the structure and does not establish the correct revenue calculation for every business.
8. How to Test GA4 Events
Always validate event collection before using the data to make business decisions. An event can appear to fire while carrying incorrect values or missing product information.
- Use GTM Preview: Confirm that the correct trigger and tag fire when the user performs an action.
- Open GA4 DebugView: Inspect incoming events and their parameters during a supported debugging session.
- Test a complete journey: View a product, add it to the cart, start checkout, and complete a test order when possible.
- Verify transaction details: Check currency, value, item IDs, quantities, and transaction IDs.
- Look for duplicates: Check whether plugins, direct tags, or GTM send the same event more than once.
- Review reports: Allow time for standard reports to process data after confirming events are received.
Interactive GA4 event implementation checklist
9. Common GA4 Event Tracking Mistakes
Using custom event names unnecessarily
Replacing recommended events with custom names can make standard e-commerce reporting more difficult. Use the recommended event name when it accurately describes the interaction.
Sending incomplete item data
Events without reliable item identifiers, names, prices, or quantities may limit product-level analysis. Map the commerce platform’s product fields to the appropriate GA4 item parameters.
Firing events at the wrong time
An add_to_cart event should reflect a successful cart
addition. A purchase event should reflect a confirmed
transaction. Incorrect triggers can overstate customer intent or
revenue.
Duplicating purchase events
Repeated confirmation-page visits, multiple tags, or duplicated integration logic can produce repeated purchase events. Review the entire tracking architecture and use reliable transaction identifiers.
Assuming all events are automatic
Installing the Google tag does not guarantee that all shopping, checkout, and transaction events are collected. Verify each required event in the actual implementation.
Ignoring consent and data quality
Consent configuration, ad blockers, browser restrictions, and implementation errors can affect the data received. Follow applicable privacy requirements and document known measurement limitations.
10. Frequently Asked Questions About GA4 Events
What are the most important GA4 events for e-commerce?
The core events are view_item,
add_to_cart, begin_checkout, and
purchase. Product-list, cart, shipping, payment,
promotion, and refund events add more detail.
Does GA4 automatically track add-to-cart events?
Not simply because the Google tag is installed. Add-to-cart tracking generally requires a supported e-commerce integration or an explicit event implementation.
What is the difference between an event and a conversion?
An event records an interaction or occurrence. A key event is an event designated as important to the business in GA4. A purchase is commonly treated as a key event because it represents a completed transaction.
Can I use Google Tag Manager to track all GA4 events?
Google Tag Manager can manage many GA4 events, provided the required data is available and the appropriate triggers and tags are configured. Some checkout or platform-specific interactions may require additional integration work.
How do I know whether a GA4 event is working?
Use GTM Preview to inspect triggers and tags, and GA4 DebugView to inspect received events and parameters. Then verify the relevant reporting data after processing.
Can GA4 track refunds?
Yes. The recommended refund event can record refund
information associated with a transaction. Implement it using
accurate transaction IDs and the appropriate item and monetary
parameters.
Should I create a custom event for every button?
No. Track interactions that support a clear measurement goal. Use recommended events when appropriate, and create custom events only when an existing event does not describe the interaction.
How many GA4 events should an online store track?
There is no universal number. Start with the events needed to understand product discovery, cart activity, checkout, and purchases. Add more events when they answer specific business questions.
Conclusion: Build a Better GA4 Event Tracking Strategy
GA4 events provide the foundation for understanding how customers interact with an online store. From product discovery and shopping cart activity to checkout and completed transactions, the right events reveal where shoppers engage and where they leave the journey.
Start with the core e-commerce events, use Google’s recommended names and parameters, and validate every implementation. Expand your event coverage as your analytics requirements grow, while keeping the tracking setup accurate, privacy-conscious, and easy to maintain.
A well-implemented GA4 event strategy helps e-commerce businesses improve funnel analysis, understand product performance, measure marketing outcomes, and make better-informed decisions.
