Skip to content
Home » Blog » How do I get the event begin_checkout to show in GA4 from Shopify?

How do I get the event begin_checkout to show in GA4 from Shopify?

To get the “begin_checkout” event to show in GA4 from Shopify, you can use the following Shopify script:

dataLayer.push({
  'event': 'begin_checkout',
  'customerType': '{{customer.type}}',
  'ecommerce': {
    'checkout': {
      'actionField': {'step': 1},
      'products': {{checkout.line_items | json}}
    }
  }
});

This script fires the “begin_checkout” event with the required parameters to track the checkout process in GA4. The “customerType” parameter can be used to segment your audience based on customer type. The “ecommerce” object contains the checkout object with the “actionField” parameter set to the current checkout step (in this case, step 1) and the “products” parameter containing the line items in the customer’s cart.

To ensure that the event is properly firing, you can use the Google Tag Assistant browser extension to verify that the “begin_checkout” event is being sent to GA4 when a customer initiates the checkout process.

Once the “begin_checkout” event is properly firing and tracked in GA4, you can use the data to gain insights into your checkout process, including cart abandonment rates and checkout completion rates.