Analytics
4.2K members online now
4.2K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

BigQuery: pulling revenue (hits.transaction.transactionRevenue or totals.transactionRevenue)

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi

 

I noticed in the BigQuery Cookbook that when pulling revenue you divide by 1000000. Does anyone know the reason for this?

BigQuery: pulling revenue (hits.transaction.transactionRevenue or totals.transactionRevenue)

[ Edited ]
Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

I don't think this really answers your questions on truly "why", but it might help:

 

totals.totalTransactionRevenue is defined as (from BQ Export Schema):

 

Total transaction revenue, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000).

 

So, for some reason, it is multiplied by 1,000,000 before being inserted in BQ and therefore you need to divide by 1,000,000. I can speculate that it might have to do with the fact that foreign currencies are converted to USD (or master currency) and when doing the conversion they want to be more precise than to the nearest cent. 

 

I would be interested to know if this is correct or there is another reason.