Data type for metrics in JSON object



What is the correct data type for each metric in JSON object?

I trying to parse conversion_purchases sale_amount as Java Int and it fails due to number out of range of int. This will require us to use Java Long for parsing sale_amount.

Are there any other metrics that exceeds max value of Java Int?



The most common gotcha is with the ID string possibly being returned as 64-bit, please see this document which clarifies about that:

For each response endpoint we generally return micros for anything that could contain a currency (like USD or JPY), number format for anything that would fit in Double or Int-32 and 64-bit should follow same rules as the above document. Each endpoint is independent so you may find cases where it doesn’t make sense to you, feel free to send us feedback in these cases.

Will also take this as feedback as we improve documentation moving forward.