2
votes

I have server-side app creating Audiences with specific segments. I know the names of dimensions/metrics can differ for UI and API. Therefore I am using Dimensions & Metrics Explorer for checking the appropriate name in API.

Explorer settings:

  • API names
  • Only show allowed in segments

The problem is, that there are some dimmensions/metrics which explorer tag as "allowed in segment" but I am getting error from API "ga:xyz is not allowed in advanced segments."

It is doing for example:

  • ga:revenuePerUser
  • ga:sessionsPerUser
  • ga:transactionsPerUser
  • ...

Do anyone know why? Is it bug in API documentation?

1
Is it a session or user based segment? Perhaps the above are only allowed in user ones? - MarkeD
The segment looks like that: users::condition::ga:revenuePerUser>5 - MakoBuk

1 Answers

1
votes

Documentation error. In the MetaData API, it is marked as "allowedInSegments": "false",

https://www.googleapis.com/analytics/v3/metadata/ga/columns?pp=1