Search code examples
node.jsgoogle-analyticsanalyticsgoogle-analytics-apigoogle-analytics-4

Automate Data Import to GA4


I am trying to automate refunds report to google analytics 4. I can't find good documentation on importing this data using analytics management API. I came across https://www.npmjs.com/package/@google-analytics/data which seems to be good for pulling reports from GA but couldn't get a way of doing data import.

I am writing a nodejs script and was hoping someone has encountered this scenario before and could share how they accomplished it. Any help or point in the right direction will be really appreciated.


Solution

  • The alternative to the UA Analytics Management api is the Google Analytics Admin API for ga4

    To my knowledge it doesn't support data important at this time the API is still under development it may come in the future there is no way to know.

    I would suggest looking at the measurement protocol for ga4 you may be able to use that