2

I would like to retrieve data from Google Analytics Data API. Endpoint is:

https://analyticsdata.googleapis.com/v1beta/properties/{property_id}:runReport

I would like to get report of number of events per event_name and username (from user_properties), what is the metric and dimension that I should use?

I tried initially dimension:user_id but I got 'Field user_id is not a valid dimension'.

Thank you!

1 Answer 1

0

To query that data using the runReport method, you'll need to register "username" as a User-scoped custom dimension. There's documentation on that in Custom dimensions and metrics.

However, it's not recommended to register a high-cardinality dimension like a "username" as a custom definition; here are some best practice alternatives to consider: Best practices for User-ID.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.