console.log('[GTM DEBUG] gtag purchase params:', {
transaction_id: aod.transaction,
value: parseFloat(aod.amount),
currency: aod.currency==='TL'?'TRY':aod.currency,
items: aod.products.map(p=>({
id: p.identifier.toString(),
name: p.name,
category: p.category,
quantity: parseInt(p.quantity,10),
price: parseFloat(p.total_base_amount)
}))
});
gtag('event','purchase',{
transaction_id: aod.transaction,
value: parseFloat(aod.amount),
currency: aod.currency==='TL'?'TRY':aod.currency,
items: aod.products.map(p=>({
id: p.identifier.toString(),
name: p.name,
category: p.category,
quantity: parseInt(p.quantity,10),
price: parseFloat(p.total_base_amount)
}))
});