Search code examples
google-analyticsmetrics

Google analytics metrics number of new vs returning customers


I use data from google analytics API (v3 and v4). I have access to all metrics.

I need to get the rate of Returning Customers.

So I need to get the number of new purchasers vs. le number of the old purchasers.

My question is: How can I use the google analytics metrics to calculate the returning customer's rate?


Solution

  • I found the solution for the google analytics v3 API

    to calculate the number of new customers, calculate the number of users who made a single transaction during the defined period

    • metrics : ga:users,ga:transactions
    • dimensions : [EMPTY]
    • filters : ga:transactions==1

    to calculate the number of new returning customers, calculate the number of users who made more than one transaction during the defined period

    • metrics : ga:users,ga:transactions
    • dimensions : [EMPTY]
    • filters : ga:transactions>1

    we can simulate it here https://ga-dev-tools.web.app/query-explorer/