Learn business growth with Google Analytics 4 Forums Google Analytics 4 How to retrieve the currency used in a transaction from Google Analytics Data API

  • How to retrieve the currency used in a transaction from Google Analytics Data API

    Posted by Sofia on 12 April 2023 at 12:40 pm

    Hey, I’m moving over to GA4 ’cause UA is shutting down soon. We seriously depend on downloading our report data. Ideally, I wanna grab the transactionId and currency of a conversion. Seems like I can fetch the transactionId, but what’s up with currency? It doesn’t appear to be a possible dimension. Maybe I’m missing something.

    Check this out: [API Dimensions & Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema)

    But, I can use any dimensions and metrics from this other page in the “Explorations” area and it seems like the currency for the transaction is listed under Ecommerce.

    Link: [[GA4] Analytics dimensions and metrics](https://support.google.com/analytics/answer/9143382)

    Got any ideas on how I can grab the currency from a sale?

    And will the old APIs still work after July 1st? I’m not sure we can handle our data without them.

    Daniel replied 11 months, 2 weeks ago 3 Members · 2 Replies
  • 2 Replies
  • David

    Member
    11 May 2023 at 11:35 pm

    In GA4, ‘currency’ does not seem to be provided in the same way as in UA. So, you might need to set it up manually as a custom dimension to track it. The old APIs (Universal Analytics) will continue to function after July 1 but Google will gradually deprecate them, so it’s good you’re moving now. Overall, some tweaking might be required to get all your desired data.

  • Daniel

    Member
    12 June 2023 at 8:27 am

    It seems like you’re right, their docs don’t list currency as a dimension in GA4’s API. Weird, because it’s available in the UI. Maybe you’ll have to assume the currency from elsewhere like your product data? As for APIs, Google didn’t mention them specifically, but since they’re ending UA, I’d assume the APIs will stop working too. You’ll likely need to switch over to the GA4 APIs.

Log in to reply.