0
votes

Is there a way to programmatically define custom dimensions using the Google Analytics Admin API (that works with GA4)?

I'm talking about defining the dimensions ahead of time so I can send them along with events, which is what you'd manually do in the Google Analytics user interface (under All events > Manage Custom Definitions). This is what I'd like to do programmatically. Once they're defined, sending these custom dimensions along with tracking events is easy enough (using gtag).

Apparently, this was possible in the previous version of the API, but that API says that it "does not support GA4 properties".

1

1 Answers

0
votes

Jan,

You are correct that the Google Analytics Management API V3 cannot be used to configure GA4 properties. The Analytics Admin API V1, which supports GA4, does not currently have methods to create custom metrics/dimensions.

I will update this question once we have more information on when this feature can become available.

Thanks, Ilya

The Google Analytics Team