MarkV
MarkV

Reputation: 3

GA4 Social Network Dimension?

I'm trying to get the social network referrers using the Google Analytics GA4 API, like we used to do using the UA API.

Under UA, the code looked like this:

DataResource.GaResource.GetRequest req = 
             GoogleApiService.Data.Ga.Get("ga:" + viewID, 
                                          periodStartStr, periodEndStr, 
                                          "ga:pageviews");
req.Dimensions = "ga:paidSocial";
req.MaxResults = 100;

...and it returned categories like:

Dailymotion
Facebook
Instagram
Pinterest
Yelp
YouTube

What's the equivalent dimension when using the GA4 API?

Upvotes: 0

Views: 22

Answers (0)

Related Questions