add_payment_info Event
The add_payment_info
event tracks when a user submits their payment details during checkout. This is a key signal for purchase intent and is often a precursor to the final purchase event.
The add_payment_info model
This model captures cart contents and the method of payment entered by the user.
Properties
- Name
event
- Type
- string
- Description
Must be set to
add_payment_info
.
- Name
user_id
- Type
- string
- Description
Unique identifier for the user submitting payment.
- Name
session_id
- Type
- string
- Description
Unique identifier for the session.
- Name
ecommerce.currency
- Type
- string
- Description
ISO 4217 currency code (e.g.,
USD
).
- Name
ecommerce.value
- Type
- float
- Description
Total value of the transaction so far.
- Name
ecommerce.payment_type
- Type
- string
- Description
Payment method provided by the user (e.g.,
credit_card
,paypal
).
- Name
ecommerce.items
- Type
- array
- Description
Array of items in the transaction.
- Name
ecommerce.items[].item_id
- Type
- string
- Description
Product or SKU ID.
- Name
ecommerce.items[].item_name
- Type
- string
- Description
Product name.
- Name
ecommerce.items[].item_brand
- Type
- string
- Description
Brand name.
- Name
ecommerce.items[].item_category
- Type
- string
- Description
Category name.
- Name
ecommerce.items[].item_variant
- Type
- string
- Description
Product variant (e.g., size, color).
- Name
ecommerce.items[].price
- Type
- float
- Description
Price per unit.
- Name
ecommerce.items[].quantity
- Type
- int
- Description
Quantity of the item.
Push event to the dataLayer
dataLayer.push example
dataLayer.push({
event: 'add_payment_info',
user_id: 'user-789',
session_id: 'session-abc',
ecommerce: {
currency: 'USD',
value: 89.99,
payment_type: 'credit_card',
items: [
{
item_id: 'SKU-101',
item_name: 'Wireless Headphones',
item_brand: 'SoundPeak',
item_category: 'Electronics',
item_variant: 'Black',
price: 89.99,
quantity: 1
}
]
}
});
Best Practices
- Trigger this event after the user submits their payment method, but before purchase confirmation.
- Avoid storing sensitive information like full card numbers.
- Always include value and payment type for conversion modeling.
Use Cases
The add_payment_info
event supports:
- Drop-off tracking before purchase
- Funnel optimization in checkout
- Conversion attribution
- Segmentation of high-intent users