mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-20 06:44:32 +00:00
fix: include items array in purchase dataLayer (#8339)
Include GA4-style `items` payload for subscription purchase events so GTM receives the full item array. So, to align with GA4's ecommerce standards, we changed it to an items array: https://developers.google.com/analytics/devguides/collection/ga4/item-scoped-ecommerce
This commit is contained in:
@@ -237,10 +237,14 @@ describe('useSubscription', () => {
|
||||
event: 'purchase',
|
||||
transaction_id: 'sub_123',
|
||||
currency: 'USD',
|
||||
item_id: 'monthly_creator',
|
||||
item_variant: 'monthly',
|
||||
item_category: 'subscription',
|
||||
quantity: 1
|
||||
items: [
|
||||
{
|
||||
item_id: 'monthly_creator',
|
||||
item_variant: 'monthly',
|
||||
item_category: 'subscription',
|
||||
quantity: 1
|
||||
}
|
||||
]
|
||||
})
|
||||
expect(localStorage.getItem('pending_subscription_purchase')).toBeNull()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user