Skip to content

Bug Report: GA4 API returns http_403 error when querying certain dimensions #438

@DamonDay

Description

@DamonDay

Description

When using the ga_data() function in R to fetch GA4 data, some dimensions started failing today with a http_403 User does not have sufficient permissions error. The exact same code worked fine yesterday.

Code Example

ga_data(
  propertyId = my_property_id,
  dimensions = c(
    "date",
    "country",
    # "pageLocation",  # causes error
    "pagePathPlusQueryString"  # causes error
  ),
  metrics = c("sessions"),
  date_range = c(start_date, end_date)
)

Observed Behavior

Queries succeed when only using date and country dimensions.

As soon as I add certain dimensions like pageLocation or pagePathPlusQueryString, the API call fails.

Error message:

http_403 User does not have sufficient permissions for this property.
To learn more about Property ID, see https://developers.google.com/analytics/devguides/reporting/data/v1/property-id

Expected Behavior

These dimensions should return data as before (yesterday they worked fine).

Environment

R client for Google Analytics Data API

GA4 property

The issue started today (previous day the exact same query was successful).

Additional Context

Permissions for the GA4 property have not changed.

Only specific dimensions seem to trigger the error.

Could this be a breaking change on the GA4 API side regarding available dimensions or required permissions?

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions