Shopify GA4 shipping and payment events with GTM
Track add_shipping_info and add_payment_info on Shopify through Customer events, with exact GA4 names, item data and separate checkout tests.
Shahzada Ali Hassan, founder of Crisperchecked against 13 sources
The short answer
Track Shopify checkout submissions by mapping Customer events to GA4 add_shipping_info and add_payment_info through GTM. Shopify's shipping eventshopify.dev requires Checkout Extensibility and records a shipping-rate choice. This guide is for store owners checking checkout steps without relying on the older Plus-only theme-editing method.
- Use separate GA4 Event tags for shipping and payment.
- Keep checkout entry separate from payment submission.
- If your existing integration sends these events, inspect it first.
- Steps and settings checked against Google and Shopify documentation on 25 October 2026.
FREE CALL
30 MINMeta stopped counting your leads? Get them counted again.
- Pick a time
Check your Meta account with Hassan- See what to do next
On a free 30-minute call, Hassan checks your Meta account with you and shows you what to do next.
Not ready to talk? Run a free check
01How do I track shipping and payment steps in GA4?
Test shipping-rate selection and payment submission as separate actions. Google's ecommerce guidedevelopers.google.com gives each its own event, so record which action you performed before comparing the received data.
The video shows the older checkout-access method; the written steps use Customer events and replace the blanket Shopify Plus-only claim.
02Do I need Shopify Plus to use these checkout events?
Do not use the old Plus-only theme access rule as the requirement for this method. Shopify's custom pixel setuphelp.shopify.com uses Settings > Customer events; checkout_shipping_info_submittedshopify.dev specifically requires Checkout Extensibility.
Use a development store, a test container and a GA4 web stream. If Google & YouTube already supplies the needed data, keep that installation and investigate any missing step first.
03How do I prepare the Google tag?
Connect the test container to the intended GA4 stream before adding checkout event tags.
1. Confirm the destination
Google's setup guidesupport.google.com documents the Google Analytics destination and the alternate Google tag method.
- Reuse the store's Google tag and GA4 web stream.
- For Google's alternate methodsupport.google.com, enter the stream's Measurement ID as Tag ID.
- Give that Google tag an Initialization trigger.
Done when the saved ID matches the intended stream.
04Which checkout fields should I send to GA4?
Send items and, when available, their value and currency. Google's event referencedevelopers.google.com also defines optional shipping_tier and payment_type; omit them when the payload does not supply a reliable value.
- Create Data Layer Variablessupport.google.com, which read named values from the data layer.
- Choose Version 2 for nested fieldssupport.google.com.
- Enter the paths below.
items
- Data Layer Variable path
- ecommerce.items
- Check
- Product objects, not a text string
currency
- Data Layer Variable path
- ecommerce.currency
- Check
- Checkout currency
value
- Data Layer Variable path
- ecommerce.value
- Check
- All source line totals, including unidentified lines
page_location
- Data Layer Variable path
- page_location
- Check
- The page URL from the event context
Done when each saved variable has the correct path.
05How do I subscribe to shipping and payment submissions?
Place both subscriptions beside the GTM loader inside one custom pixel.
2. Create the custom pixel
- On a development store, open Settings > Customer events and add a pixelhelp.shopify.com.
- Paste the GTM head snippet without its HTML script tags, as Shopify's GTM tutorialhelp.shopify.com says.
- Use the ID of a test container that only your development store loads.
- Put the subscription below in the same pixel.
- Review Customer privacy permissionshelp.shopify.com against the store's consent plan.
Done when the saved pixel contains your test container ID, the subscription and the intended privacy settings.
3. Add the two subscriptions
Shopify's shipping eventshopify.dev records a shipping-rate choice; its payment eventshopify.dev records submitted payment information. These sample callbacks, the functions run when an event arrives, keep the actions separate.
- Add both subscriptions below to the same custom pixel.
- Save the pixel.
- Test each callback locally with mixed valid and null-variant lines, a null variant ID, and all-null variants.
- Compare the full source-line total with the checkout before accepting discounted or bundled test cases.
window.dataLayer = window.dataLayer || []; analytics.subscribe("checkout_shipping_info_submitted", (event) => { const checkout = event.data.checkout; const currency = checkout.currencyCode; if (!currency || checkout.lineItems.length === 0) { throw new Error("Checkout mapping needs currency and source lines"); } // Validate and total every source line before filtering item identifiers. const value = checkout.lineItems.reduce((sum, line) => { const quantity = line.quantity; const amount = line.finalLinePrice?.amount; if (amount == null || !Number.isFinite(Number(amount)) || !Number.isFinite(quantity) || quantity <= 0 || line.finalLinePrice.currencyCode !== currency) { throw new Error("Check checkout line price, quantity and currency"); } return sum + Number(amount);
69 more lines of JavaScript
- Copy and download
- Emailed to you
Unlock this snippet
Two details, and the full code is yours
No account needed. Unlock once and every snippet on the blog opens.
Done when both subscriptions are saved and each pushes its own custom event name, and in the local tests each event retains its full value and currency, every emitted item has its original variant ID, and all-null input produces an empty items array without suppressing the event.
Shopify's event referenceshopify.dev allows a null variant, variant ID or line title. This sample filters out lines without a variant ID before mapping items, and omits a missing title. Value still includes every validated source line, so item reporting is incomplete when a line is skipped.
Shopify's checkout payloadshopify.dev defines finalLinePrice as the line total after line-level discounts and makes it available with Checkout Extensibility. This sample totals all source lines for value, then divides each identified line total by quantity for its item price. Google's event referencedevelopers.google.com defines value as the sum of price times quantity, excluding shipping and tax.
06How do I create the two GA4 Event tags?
Create one exact-match Custom Event trigger and one GA4 Event tag for each action.
4. Configure shipping and payment tags
- Create a Google Analytics: GA4 Eventsupport.google.com tag for shipping.
- Enter the intended Measurement ID.
- Set Event Name to
add_shipping_info. - Map each table row in Event Parameters.
- Attach the
custom_add_shipping_infoCustom Event trigger. A trigger is the condition that runs a tag. - Create a second Google Analytics: GA4 Eventsupport.google.com tag for payment.
- Enter the intended Measurement ID.
- Set Event Name to
add_payment_info. - Map each table row in Event Parameters.
- Attach the
custom_add_payment_infoCustom Event trigger.
Done when reopening each tag shows its event name, stream, parameters and trigger.
07How do I test both checkout steps?
Choose a shipping rate, then submit payment information in a test checkout. Check each event at the moment its action occurs.
5. Enable debug mode and publish the test version
Changes saved in a workspace do not run yet. Google sayssupport.google.com you need to publish workspace changes to make them operational.
- Before publishing, open both GA4 Event tags in the development-only container.
- On each, add
debug_modewith valuetruein Event Parameters, following Google's DebugView instructionssupport.google.com. - Save the tag settings.
- Open the test container that only your development store loads.
- Select Submit, then choose Publish and Create Version.
- Name the version and publish.
Do not publish to a container your live store loads; move the tested setup there through your normal release process.
Done when reopening both tags shows debug_mode set to true in the published version, the test container's Versions list shows your version as published and the pixel code loads that container's ID.
6. Exercise fresh events and inspect receipt
- Connect the development-store pixel.
- Choose Test. Shopify Pixel Helperhelp.shopify.com shows subscribed events and code errors.
- Choose a shipping rate.
- Submit payment information.
- In Pixel Helper, check that checkout_shipping_info_submitted and payment_info_submitted each have a green dot and their payloads match the actions.
- With the debug_mode test version published, start a fresh test checkout.
- Open GA4 DebugView.
- Inspect add_shipping_info and add_payment_info separately.
- Remove debug_mode from the non-test configuration.
Done when both Shopify events have a green dot with payloads that match the actions, and each GA4 event has the correct items, currency and value.
Use Shopify Pixel Helper for the subscription and GA4 DebugView for receipt. Shopify says Tag Assistant's Troubleshoot tag feature is incompatible with custom pixelshelp.shopify.com; a green Pixel Helper dot confirms local execution, not GA4 delivery.
08Why are my shipping or payment events missing?
Check the checkout action and payload before editing the GA4 tags.
- A shipping event on checkout entry reports the wrong step. Trigger it from the shipping-rate submission instead.
- An unsupported shipping checkout cannot supply the documented event. Check Shopify's Checkout Extensibility requirementshopify.dev.
- Inventing a payment_type creates a false breakdown. Leave it out until your integration supplies the real value.
09What should I check after shipping and payment?
Continue with Shopify GA4 purchase tracking. A payment-information submission is not your completed-order trigger.
10What changed in this guide
- 25 October 2026: Replaced the blanket Plus-only restriction with Customer events and the documented Checkout Extensibility requirement; added distinct GA4 shipping/payment mappings, field definitions and completion checks. Added null-variant and null-ID filtering without reducing event value, local null-case checks, and debug mode before the full test-container publish and fresh-event checks. Replaced the repeated opening with an event-specific test instruction.
Sources
13 sources
- 1Shopify's shipping eventshopify.dev↩
- 2Google's ecommerce guidedevelopers.google.com↩
- 3Shopify's custom pixel setuphelp.shopify.com↩
- 4Google's setup guidesupport.google.com↩
- 5Google's event referencedevelopers.google.com↩
- 6Data Layer Variablessupport.google.com↩
- 7Shopify's GTM tutorialhelp.shopify.com↩
- 8its payment eventshopify.dev↩
- 9Shopify defines checkout_started separatelyshopify.dev↩
- 10Google Analytics: GA4 Eventsupport.google.com↩
- 11Google sayssupport.google.com↩
- 12Google's DebugView instructionssupport.google.com↩
- 13Shopify Pixel Helperhelp.shopify.com↩


