Lists the custom dimensions of a Google Analytics 4 property with the parameter each one reads and its scope.
curl -X POST "https://api.primaryapi.com/v1/run/google-analytics.custom_dimensions" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"propertyId":"312345678"}'{
"output": {
"found": true,
"data": {
"nextCursor": null,
"customDimensions": [
{
"name": "properties/312345678/customDimensio…",
"disallowAdsPersonalization": false,
"displayName": "Plan type",
"parameterName": "plan_type", …
}
],
"propertyId": "312345678"
}
},
"credits": 1
}Input and output
4 fields
312345678.8 fields
Good to know
Runs as your connected Google account. Needs the Read Google Analytics capability.
apiName is the name to report on it with google-analytics.report.
Create one with google-analytics.create_custom_dimension.
A property the account cannot see is a miss with reason no_access.
One page per call. Send nextCursor back as cursor to read the next page.
Unknown property ID? It comes back as not found, not as an error.
The same key and credits work for every API.