1

I have an ecommerce site, when customers complete a transaction we pass the Google analytics calls for _addTrans and _addItem

The _addItem call is made individually for each item ordered, so if a customer ordered 5 items there will be 5 calls made.

However if a customer orders a large number of items, because each item is called individually on the thankyou page, there is a high chance the customer will navigate away from the page before all the calls to GA have been made.

Does anyone know if it is possible to send all items ordered in one _addItem call to GA using an array and matched pairs?

for example if a customer orders 2 items the call could look something like

_addItem(transactionId, sku, name, category, price, quantity)

_addItem([id1,id2], [sku1,sku2], [prod1,prod2], [cat1,cat2], [2,3], [1,2])
2
  • Sorry @confidentjohn for this getting moved. I disagree, but that's moot now. In any case, how many items are we talking here? I'd also be concerned about rate limiting in GA. – MisterPhilip Oct 1 '13 at 20:41
  • Hi @MisterPhilip I disagree too, its absolutly a programming question, anyway thank you for looking at this. We can quite easily take orders where there are 30+ individual items, so if a customer leaves the thank you page, i can get partial item data for an order. – confidentjohn Oct 2 '13 at 9:02
1

John, yes it is :)

GA currently don't support multi arrays but on the new ecommerce tag, it does.

Thank

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.