Google Analytics for E-commerce: Practical guide on how to set it up
Google Analytics 4 represents a fundamental shift in the way we measure and understand visitor behaviour on online shops. With Universal Analytics having been discontinued since July 2023, migration is no longer optional.
However, many Portuguese shops operate with incomplete or incorrect set-ups, missing out on valuable insights that could boost sales and optimise marketing spend.
Initial Setup: Getting the Basics Right
Establishment and Set-up of the Property
The first step often determines the success of the entire implementation. When creating your GA4 property, you must select “Enterprise” as the category and “Online sales of products or services” as the primary objective. This selection automatically enables specific e-commerce reports and features that would be complex to configure manually.
The installation of the tracking code warrants particular attention. Whilst it may be tempting to use generic plugins, implementation via Google Tag Manager (GTM) is strongly recommended. This approach offers the flexibility that is crucial for advanced tracking without the need for constant changes to the website’s code.
For WooCommerce, the basic configuration via GTM requires:
- GTM container installed on all pages
- Data Layer configured with e-commerce variables
- GA4 configuration tag with the correct measurement ID
- Pageview trigger on all pages
Enabling Advanced E-commerce
In the GA4 property settings, enabling the e-commerce module is essential but is often overlooked. Go to Admin > Data settings > Data collection and enable “Collect e-commerce events”. Without this enabled, even if events are correctly implemented, the e-commerce reports will remain empty.
The Sales Funnel in GA4: Setup and Analysis
Understanding the New Funnel Model
GA4 revolutionises funnel analysis through unprecedented flexibility. Unlike Universal Analytics, with its rigid funnel, GA4 allows you to create custom funnels that reflect your customers’ actual journey. This capability is particularly valuable for Portuguese retailers, where purchasing behaviour may involve multiple research visits before a final decision is made.
Configuring the Standard E-commerce Funnel
The essential sales funnel for any online shop should include the following steps:
Product View (view_item): First meaningful interaction with purchase potential. Indicates specific interest and enables targeting by category or product.
Add to basket (add_to_cart): Indicates an intention to purchase. The conversion rate at this stage indicates the effectiveness of the product pages.
Start Checkout (begin_checkout): Commitment to the purchase. Drop-offs at this stage indicate issues with additional costs or trust.
Delivery Information (add_shipping_info): Progress during checkout. Abandoned baskets may indicate excessive complexity or problematic delivery charges.
Payment Information (add_payment_info): The final step before conversion. Issues at this stage are often related to payment methods.
Purchase (purchase): Final conversion. The goal of the entire funnel.
Technical Implementation of Events
Each event in the funnel requires precise implementation to ensure reliable data. The basic structure for a product view event:
gtag('event', 'view_item', {
currency: 'EUR',
value: 25.00,
items: [{
item_id: 'SKU123',
item_name: 'Product Name',
price: 25.00,
item_category: 'Category',
quantity: 1
}]
});
Consistency in naming conventions and data structure across all events is critical. Seemingly minor discrepancies can disrupt the continuity of the funnel and make analysis impossible.
Advanced Funnel Analysis
The Funnel Exploration report in GA4 provides insights that are not available in Universal Analytics. You can analyse funnels by segment (device, traffic source, location), identify exactly where different types of users drop out, and compare time periods to assess the impact of optimisations.
Key metrics to monitor:
- Overall funnel completion rate
- Drop-out rate by stage
- Average time between stages
- Average value per stage of the funnel
- Differences in behaviour between mobile and desktop
Essential E-commerce Events
Beyond the Main Funnel
Although the funnel captures the main journey, additional events provide valuable context:
List View (view_item_list): Tracking of category pages and search results. Essential for understanding the effectiveness of navigation and merchandising.
Promotional Selection (select_promotion): Measures the effectiveness of banners and in-house promotions. Critical for optimising investment in design and placement.
Removal of the Trolley (remove_from_cart): An early indicator of problems. Products that are frequently removed may have issues with their price, description or customer expectations.
Events of Strategic Importance
Wishlist/Favourites: Although not standard practice, implementing wishlist tracking reveals future purchase intent and enables targeted remarketing.
Product Comparison: If available, this indicates a high level of engagement and an advanced stage of the decision-making process.
Interaction with Reviews: Strong correlation with conversion. Users who read reviews convert 2–3 times more often.
Key Reports for E-commerce
Monetisation Report
The central hub for e-commerce metrics in GA4. Focus on:
- Revenue by source/channel for marketing ROI
- Best-selling products vs most-viewed products (identifies opportunities)
- Conversion rate by category (catalogue optimisation)
- Average order value by segment
Purchasing Behaviour Report
Analyses patterns over time:
- Purchase frequency per customer
- Time between purchases
- Products often bought together
- Seasonality by category
Segment Explorer
Create segments for in-depth analysis:
- Buyers vs non-buyers
- High-value customers
- Shopping-trolley abandoners
- Mobile shoppers vs desktop shoppers
Common Mistakes and How to Avoid Them
Duplication of Transactions
The most costly error in terms of incorrect decisions. This occurs when the tracking code fires multiple times on the confirmation page. Solution: implement duplicate checking and use the unique transaction_id consistently.
Incorrect Revenue Figures
This is often caused by inconsistent inclusion of VAT or postage. Clearly state whether the amounts include tax and ensure consistency across all transactions. Document the decision for future reference.
Cross-Domain Data Loss
For shops with multiple domains (e.g. a separate domain for payment), setting up cross-domain tracking is essential. Without it, each domain is treated as a new session, artificially inflating abandonment rates.
Incorrect Attribution of Conversions
GA4’s default attribution model (data-driven) may not be suitable for all businesses. Assess whether it makes sense for your sales cycle and adjust it if necessary. For long-consideration products, last-click attribution may undervalue top-of-funnel channels.
Integration with Other Tools
Google Ads: Maximising Return
Proper integration enables:
Automatic import of conversions
Behaviour-based remarketing audiences
Optimising bids by conversion value
Correct attribution of sales to campaigns
Configure the connection in both directions and ensure that the conversion values match exactly across platforms.
Search Console: A Comprehensive Overview
The integration reveals:
Search queries that generate sales vs those that generate traffic only
Landing pages that convert best
Revenue-based SEO opportunities
Next Steps
Setting up GA4 correctly for e-commerce is a vital investment that pays dividends through better decision-making. Start with the basic funnel implementation, ensure data quality, and gradually expand to more sophisticated events.
Consistent analysis of the data collected makes it possible to identify opportunities for optimisation that cannot be discovered through intuition alone. Every incremental improvement in the funnel translates directly into increased revenue.
Ascend Marketing Solutions offers specialist GA4 configuration and optimisation services for e-commerce. We guarantee correct implementation, team training and customised dashboards that turn data into decisions.
Need help with your GA4? Please contact us via [email protected]
References
- Google Analytics Help (2024). [GA4] Set up E-commerce for your Google Analytics property. Official Google documentation. support.google.com/analytics/answer/9612232
- Google Developers (2024). Measure e-commerce – Google Analytics 4. Technical implementation guide. developers.google.com/analytics/devguides/collection/ga4/ecommerce
- Simo Ahava (2024). The Complete Guide to Google Analytics 4 E-commerce Tracking. A detailed analysis of implementation. simoahava.com/analytics/google-analytics-4-ecommerce-guide
- Google Tag Manager Help (2024). E-commerce (GA4) developer documentation. Official GTM documentation. support.google.com/tagmanager/answer/6107169
- Analytics Mania (2024). Google Analytics 4 E-commerce Tracking. A practical tutorial with examples. analyticsmania.com/post/google-analytics-4-ecommerce-tracking
- MeasureSchool (2023). GA4 E-commerce Tracking Guide. Video tutorial and documentation. measureschool.com/ga4-ecommerce-tracking
- E-Nor (2024). GA4 Migration Guide for E-commerce. Universal Analytics Migration Guide. e-nor.com/blog/google-analytics/ga4-migration-guide
- Loves Data (2024). Google Analytics 4 Tutorial. Educational resources on GA4. lovesdata.com/blog/google-analytics-4
Frequently Asked Questions
It is not compulsory, but it is highly recommended. GTM allows you to make changes without touching the website’s code, version changes, and perform advanced debugging. For basic tracking, plugins may be sufficient, but they limit future growth.
Basic setup: 2–4 hours. Full setup including all e-commerce events: 1–2 days. Refinement and optimisation: an ongoing process based on emerging needs.
Yes, provided it is set up correctly. It must implement a cookie banner, respect users’ choices, anonymise IP addresses, and set appropriate data retention periods. Google’s consent mode makes compliance easier.
No. UA stopped processing data in July 2023. Historical data remains accessible for the time being, but no new data is being collected. Migration to GA4 is mandatory.
Use GA4’s DebugView to view events in real time. Make some test purchases and check whether they appear within 24 hours. Compare the figures in GA4 with those in your internal system. Minor discrepancies (<5%) are normal.