Shopify7 min read1 view

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.

Watch on YouTube

Jump to the code

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.

Ask an assistant

ChatGPTClaudePerplexity

FREE CALL

30 MIN

Meta stopped counting your leads? Get them counted again.

  1. Pick a time
  2. Check your Meta account with Hassan
  3. 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.

Book my free recovery callFree 30-minute call with Hassan.

Not ready to talk? Run a free check

How 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.

Do 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.

How 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.

  1. Reuse the store's Google tag and GA4 web stream.
  2. For Google's alternate methodsupport.google.com, enter the stream's Measurement ID as Tag ID.
  3. Give that Google tag an Initialization trigger.

Done when the saved ID matches the intended stream.

Which 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.

  1. Create Data Layer Variablessupport.google.com, which read named values from the data layer.
  2. Choose Version 2 for nested fieldssupport.google.com.
  3. 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
These paths must match the event payload.

Done when each saved variable has the correct path.

How do I subscribe to shipping and payment submissions?

Place both subscriptions beside the GTM loader inside one custom pixel.

2. Create the custom pixel

  1. On a development store, open Settings > Customer events and add a pixelhelp.shopify.com.
  2. Paste the GTM head snippet without its HTML script tags, as Shopify's GTM tutorialhelp.shopify.com says.
  3. Use the ID of a test container that only your development store loads.
  4. Put the subscription below in the same pixel.
  5. 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.

  1. Add both subscriptions below to the same custom pixel.
  2. Save the pixel.
  3. Test each callback locally with mixed valid and null-variant lines, a null variant ID, and all-null variants.
  4. Compare the full source-line total with the checkout before accepting discounted or bundled test cases.
javascript87 lines
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.

We email you a copy.

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.

How 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

  1. Create a Google Analytics: GA4 Eventsupport.google.com tag for shipping.
  2. Enter the intended Measurement ID.
  3. Set Event Name to add_shipping_info.
  4. Map each table row in Event Parameters.
  5. Attach the custom_add_shipping_info Custom Event trigger. A trigger is the condition that runs a tag.
  6. Create a second Google Analytics: GA4 Eventsupport.google.com tag for payment.
  7. Enter the intended Measurement ID.
  8. Set Event Name to add_payment_info.
  9. Map each table row in Event Parameters.
  10. Attach the custom_add_payment_info Custom Event trigger.

Done when reopening each tag shows its event name, stream, parameters and trigger.

How 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.

  1. Before publishing, open both GA4 Event tags in the development-only container.
  2. On each, add debug_mode with value true in Event Parameters, following Google's DebugView instructionssupport.google.com.
  3. Save the tag settings.
  4. Open the test container that only your development store loads.
  5. Select Submit, then choose Publish and Create Version.
  6. 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

  1. Connect the development-store pixel.
  2. Choose Test. Shopify Pixel Helperhelp.shopify.com shows subscribed events and code errors.
  3. Choose a shipping rate.
  4. Submit payment information.
  5. In Pixel Helper, check that checkout_shipping_info_submitted and payment_info_submitted each have a green dot and their payloads match the actions.
  6. With the debug_mode test version published, start a fresh test checkout.
  7. Open GA4 DebugView.
  8. Inspect add_shipping_info and add_payment_info separately.
  9. 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.

Why 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.

What should I check after shipping and payment?

Continue with Shopify GA4 purchase tracking. A payment-information submission is not your completed-order trigger.

What 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
  1. 1Shopify's shipping event↩
  2. 2Google's ecommerce guide↩
  3. 3Shopify's custom pixel setup↩
  4. 4Google's setup guide↩
  5. 5Google's event reference↩
  6. 6Data Layer Variables↩
  7. 7Shopify's GTM tutorial↩
  8. 8its payment event↩
  9. 9Shopify defines checkout_started separately↩
  10. 10Google Analytics: GA4 Event↩
  11. 11Google says↩
  12. 12Google's DebugView instructions↩
  13. 13Shopify Pixel Helper↩