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

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

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

dataLayer.push({
  'event': 'add_payment_info',
  'ecommerce': {
    'currencyCode': '{{shop.currency}}',
    'paymentType': '{{checkout.payment_gateway}}',
    'checkout': {
      'actionField': {'step': 2},
      'products': {{checkout.line_items | json}}
    }
  }
});

This script fires the “add_payment_info” event with the required parameters to track the payment information in GA4. The “ecommerce” object contains the “currencyCode” parameter set to the store’s currency, the “paymentType” parameter set to the payment gateway used by the customer, and the “checkout” object with the “actionField” parameter set to the current checkout step (in this case, step 2) 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 “add_payment_info” event is being sent to GA4 when a customer adds payment information during checkout.

Once the “add_payment_info” event is properly firing and tracked in GA4, you can use the data to gain insights into your payment process, including payment gateway popularity and payment conversion rates.