: When reversing a Google Analytics e-commerce transaction is the per-unit price positive or negative? Google's own instructions for reversing an e-commerce transaction seem to contradict themselves
Google's own instructions for reversing an e-commerce transaction seem to contradict themselves regarding the unit price.
In the instructions it states
The item field has a positive per-unit price and a negative quantity.
yet, the code sample has a negative per-unit price and negative quantity.
_gaq.push(['_addItem',
'1234', // order ID - necessary to associate item with transaction
'DD44', // SKU/code - required
'T-Shirt', // product name
'Olive Medium', // category or variation
'-11.99', // unit price - required
'-1' // quantity - required
]);
Which is correct?
More posts by @Carla537
1 Comments
Sorted by latest first Latest Oldest Best
After experimenting on a test account it seems the instructions are correct and the example isn't or rather, may not be. (I did not test the opposite case). I tested with the unit price being positive and the quantity negative as in the example below. Analytics reported the transaction but the total amount purchased was [CO].
_gaq.push(['_addItem',
'1234', // order ID - necessary to associate item with transaction
'DD44', // SKU/code - required
'T-Shirt', // product name
'Olive Medium', // category or variation
'11.99', // unit price - required
'-1' // quantity - required
]);
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.