Learn business growth with Google Analytics 4 › Forums › Google Analytics 4 › Troubleshooting GA Data API: pageLocation Dimension Error › Reply To: Troubleshooting GA Data API: pageLocation Dimension Error
-
The error message you’re receiving is likely due to the fact that in Google Analytics 4 (GA4), the dimension corresponding to the full page URL is not ‘pageLocation’, like it was in Universal Analytics (UA), but ‘page_location’. In GA4, dimension names in API calls need to be in snake case (all lowercase with underscores) instead of camel case. Change ‘pageLocation’ to ‘page_location’ in your code, and it should work fine:
`
dimensions:
– name: “browser”
– name: “country”
– name: “page_location”
`