Ranjani
Ranjani

Reputation: 1025

Get Analytics web properties and GA4 properties in single request

We are currently using Analytics Management API to get the list of web properties.

We recently learned about the new GA4 properties in the Analytics Admin API section and are looking into supporting that.

Is there any way to get the list of web properties and a list of GA4 properties in a single request call to Analytics?

Just asking as they are shown in the same section in the Google Analytics UI.

Upvotes: 1

Views: 857

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 116918

Google Analytics G4 and Universal google analytics are two different systems which are not linked.

Google analytics GA4 does not have web properties like universal analytics. The systems are very different and not linked.

An accountsummeries.list will return all accounts but not much valid data for old universal accounts.

"accountSummaries": [
    {
      "name": "accountSummaries/181554900",
      "account": "accounts/181554900",
      "displayName": "GA4 Testing",
      "propertySummaries": [
        {
          "property": "properties/25079939",
          "displayName": "Testing"
        }
      ]
    },
    {
      "name": "accountSummaries/3788258",
      "account": "accounts/3788258",
      "displayName": "Universal analytics testing"
    },

NOTE: at the time of writing the Analytics Admin api is still in alpha testing, things may change in the future.

Upvotes: 3

Related Questions