-
Accessing Query Parameters in Google Analytics 4 API
Hey there, I’m trying to use the Google Analytics 4 API to grab data for pagePathPlusQueryString, sessionCampaignName, & totalUsers by using this POST link: https://analyticsdata.googleapis.com/v1beta/properties/GA4_PROPERTY_ID:runReport. But when I add sessionCampaignName to the dimensions, it throws a fit with some incompatibility error.
Here are my dimensions: date, pagePathPlusQueryString, and sessionCampaignName:
"dimensions": [ { "name": "date" }, { "name": "pagePathPlusQueryString" }, { "name": "sessionCampaignName" } ]
And here are my metrics: totalUsers & screenPageViews:
"metrics": [ { "name": "totalUsers" }, { "name": "screenPageViews" } ]
Anyone got a clue on how to get data with the querystring and sessionCampaignName? Any suggestions are appreciated. Thanks!
P.S.: I’m struggling with compatibility issues between pagePathPlusQueryString and sessionCampaignName.
Log in to reply.