transactionRevenue != itemRevenue + shipping + tax

466 views
Skip to first unread message

Steve Gott

unread,
Jul 13, 2010, 1:19:05 AM7/13/10
to google-analytics-api - GA Data Export API
Hi Everyone

Just a quick sanity check here. Shouldn't transactionRevenue =
itemRevenue + transactionShipping + transactionTax regardless of
timeframe?

I've tested this on a few accounts now. One with home grown E-
commerce tracking and the other where it was built into the shopping
cart but get the same mismatch.

I'm not sure if this mismatch is simply due to lost addTrans() or
addItem() gif hits, or if I'm missing something bigger.

Thanks

Nick

unread,
Jul 13, 2010, 1:31:31 PM7/13/10
to google-analytics-api - GA Data Export API
no.

transactionRevenue is set as a distinct field in the tracking code;
it's not a sum.

The tracking methods are here: http://code.google.com/apis/analytics/docs/gaJS/gaJSApiEcommerce.html

Also a calculation of total revenue would include the item quantity.

-Nick

Steve Gott

unread,
Jul 13, 2010, 5:46:30 PM7/13/10
to google-analytics-api - GA Data Export API
Hi Nick

Thanks for your reply.

I guess I'm confused because even though order total is tracked and
stored in GA as a completely separate and independent value it
actually should be equal to (item cost x item quantity) + shipping +
tax for any specific order.

For example, if my site only had the following transaction:

Item Qty Price
------------------------------------
ProductX 2 $2.00
ProductY 1 $1.00

Shipping: $5.00
Tax: $1.00

Then the tracking functions should look like:

_addTrans(orderId, affiliation, 11.00, 1.00, 5.00, city, state,
country);
_addItem(orderId, sku, ProductX, category, 2.00, 2);
_addItem(orderId, sku, ProductY, category, 1.00, 1);
_trackTrans();


Wouldn't the below API fields then have the following values.
ga:itemRevenue: 5.00
ga:transactionTax: 1.00
ga:transactionShipping: 5.00
ga:transactionRevenue: 11.00

Where transactionRevenue = itemRevenue + transactionShipping +
transactonTax.


So I guess I have a few questions.

1) Is there anything wrong with my above example.
2) If not then what is the cause when transactionRevenue !=
itemRevenue + transactionShipping + transactonTax.

My assumed answers to the above questions where:
1) Nothing wrong with this assumption.
2) If there is a mismatch, it's because incorrect values were supplied
to the tracking functions _addTrans() or addItem(). The problem is
I've seen this in both home grown shopping carts (where an error might
be possible) and off the shelf shopping carts (where an error seems
less likely).


Thanks

Nick

unread,
Jul 19, 2010, 3:42:12 PM7/19/10
to google-analytics-api - GA Data Export API
Steve,

You're right. They should align up.

It could be a tracking issue ?
-Nick
Reply all
Reply to author
Forward
0 new messages