Logo of TAGGRS, written in blue and with a small favicon
HomeServer-side Tracking
Start for free
Introduction
Get started
Get started with TAGGRSSet up Google Tag ManagerAdd the GTM Data LayerConfigure GTM transformationsTest the setupDebuggingAnalytics dashboard
Migrate from Google CloudMigrate from hosting
Shortcuts
GTM Copy PasteReady-made templates
GA4 Server-side Tracking
Setup in GTMCreate GA4 Event TagsGA4 tag setup in server containerE-commerce events in GTM
Google Ads Server-side Tracking
Install Conversion LinkerSet up Conversion TrackingConfigure Enhanced ConversionsDeploy Remarketing Tags
Facebook Server-side Tracking
Set Meta PixelImprove your EMQ ScoreInstall Meta CAPIMeta Events DeduplicationMeta CAPI Gateway
LinkedIn Server-side Tracking
Install LinkedIn Insight TagSet up LinkedIn CAPILinkedIn Events Deduplication
TikTok Server-side Tracking
Set up TikTok PixelInstall TikTok Events APITikTok Events Deduplication
Pinterest Server-side Tracking
Set up Pinterest TagConfigure Pinterest Conversions APIPinterest Events Deduplication
Snapchat Server-side Tracking
Set up Snap PixelSnapchat Conversions APISnapchat Events Deduplication
TAGGRS Tracking Tags and Tools
Tracking TagsGoogle Service Account integrationsGTM LogsProfit TrackingData Enricher ToolWebhooks TesterEnhanced Tracking ScriptMulti Domain ToolClick ID RecoveryConsent Tool
Configurations
Billy Grace Server-side TrackingLeadPages Server-side TrackingPiwik PRO Server-side TrackingCDN Server-side TrackingShopify Server-side TrackingActiveCampaign Server-side TrackingKlaviyo Server-side Tracking
Server-side Tracking for e-commerce
Shopify Data LayerShopware Data LayerMagento Data LayerWooCommerce Data LayerPrestashop Data LayerLightspeed Data Layer
Consent Management server-side
Activate Consent ModeConfigure TAGGRS with Axeptio

Create e-commerce events in GTM

This guide provides a clear, step-by-step process for implementing GA4 e-commerce event tracking in the GTM web container, ensuring your data is structured, reliable, and ready for advanced analytics.
Logo of TAGGRS Server-side Tracking: a light blue circle with two blue angle brackets
Tracking e-commerce events is essential for optimizing conversion funnels. With TAGGRS, Google Tag Manager and Google Analytics 4, you can measure crucial actions like purchases, add-to-cart, and checkout steps. So you can quantify popular products, analyze sales journeys, and attribute revenue accurately.

Prepare your Data Layer

E-commerce event tracking in GA4 relies on a well-structured data layer. This is typically populated by your e-commerce platform or custom code.

• Use the GA4 e-commerce schema for consistency.
• For platforms like WooCommerce, Magento, Shopify, or Shopware, use official plugins or extensions to inject the correct data layer.

Logo of TAGGRS Server-side Tracking: a light blue circle with two blue angle brackets
Expert tip
Always use GTM’s Preview mode to inspect your data layer and verify that events and parameters are pushed correctly.

Create a custom event trigger

  1. In GTM, go to Triggers and click New.
  2. Choose Custom Event as the trigger type.
  3. Enter the Event Name exactly as it appears in your data layer (e.g., purchase, add_to_cart).
  4. Set the trigger to fire on Some Custom Events if you want to filter further, or All Custom Events for all occurrences.
  5. Save the trigger.

Define Data Layer variables

To send e-commerce details to GA4, you need to create variables that extract values from the data layer:

  1. Go to Variables in GTM and click New.
  2. Select Data Layer Variable.
  3. Enter the data layer path (e.g., ecommerce.value, ecommerce.items, ecommerce.transaction_id).
  4. Name your variable descriptively (e.g., “DLV – ecommerce.value”).
  5. Repeat for each parameter you want to track (see table below for common variables).

Data Layer Variables descriptions

ecommerce.value
Revenue value of the event
ecommerce.currency
Currency code (e.g., USD, EUR)
ecommerce.items
Array of product objects
ecommerce.transaction_id
Unique transaction ID (for purchases)
ecommerce.coupon
Applied coupon code
ecommerce.affiliation
Store or affiliate name
ecommerce.payment_type
Payment method selected
ecommerce.shipping
Shipping cost
ecommerce.tax
Tax amount

Set the trigger for the GA4 Tag

  1. In the tag settings, click Triggering.
  2. Click the + icon to create a new trigger.
  3. Choose Custom as the trigger type.
  4. Set the trigger to fire on events generated by the GA4 client:
    • Under conditions, select Client Name equals GA4.
    • This ensures the tag only fires for events parsed by the GA4 client.
  5. Save the trigger and tag configuration.
Logo of TAGGRS Server-side Tracking: a light blue circle with two blue angle brackets
Expert tip
Use GTM Preview mode to confirm the correct variable paths for your setup.

Create a GA4 Event Tag

  1. Go to Tags and click New.
  2. Choose Google Analytics: GA4 Event as the tag type.
  3. Select your existing GA4 Configuration tag under Configuration Tag.
  4. Enter the Event Name (e.g., purchase, add_to_cart).
  5. In Event Parameters, add rows for each parameter you want to send (e.g., value, currency, items, transaction_id). Use the data layer variables you created.
  6. Link the tag to the custom event trigger you set up in Step 2.
  7. Save the tag.

What e-commerce events can you track with GA4 server-side?

GA4 Event name
Description
view_item_list
User views a product listing
select_item
User selects a product from a list
view_item
User views a product detail page
add_to_cart
User adds a product to the shopping cart
remove_from_chart
User removes a product from the cart
view_cart
User views the shopping cart
add_to_wishlist
User adds a product to a wishlist
start_checkout
User initiates the checkout process
add_shipping_info
User selects a shipping option
add_payment_info
User selects a payment method
purchase
User completes a purchase
refund
User receives a refund
view_promotion
User views a promotion
select_promotion
User selects a promotion
Logo of TAGGRS Server-side Tracking: a light blue circle with two blue angle brackets
Expert tip
Use GTM Preview mode to confirm the correct variable paths for your setup
You can also track custom business events such as form submissions, demo requests, or contact clicks.

Test and publish

  1. Use Preview mode in GTM to trigger your e-commerce events and verify that the correct data is sent to GA4 (check DebugView in GA4).
  2. Once confirmed, Submit and Publish your GTM container changes.

Useful resources

Google Analytics 4 server-side tracking - The full manual
Find expert support
Previous
GA4 tag setup
Next
Install Google Ads Conversion Linker
Copyright © 2025 TAGGRS. All right reserved.
TABLE OF CONTENTS
Prepare your Data LayerCreate a custom event triggerDefine Data Layer variablesSet the triggerCreate a GA4 Event TagTest and publishTroubleshootingUseful resources