The Issue
When running the standard install.sh script in a GCP project where the analyticsreporting.googleapis.com API has not been previously enabled, the installation fails. The script cannot enable this specific API, which appears to be a required dependency; blocking new installations of CRMint.
To Reproduce
Select a GCP project where analyticsreporting.googleapis.com has never been enabled.
Ensure the user has Owner permissions on the project.
Run the installation script: bash <(curl -Ls https://raw.githubusercontent.com/google-marketing-solutions/crmint/master/scripts/install.sh)
Observe the failure at the "Activate Cloud services" step.
Observed Error
The script fails with the following error, indicating a permissions issue that persists even for a Project Owner:
Failed step "Activate Cloud services"
command: $GOOGLE_CLOUD_SDK/bin/gcloud --quiet services enable --project=[PROJECT_ID] ... analyticsreporting.googleapis.com ...
exit code: 1
stderr:
ERROR: (gcloud.services.enable) [[email protected]] does not have permission to access projects instance [[PROJECT_ID]] (or it may not exist): Not found or permission denied for service(s): analyticsreporting.googleapis.com.
Help Token: [TOKEN_ID]
- '@type': type.googleapis.com/google.rpc.PreconditionFailure
violations:
- subject: ?error_code=220002&services=analyticsreporting.googleapis.com
type: googleapis.com
- '@type': type.googleapis.com/google.rpc.ErrorInfo
domain: serviceusage.googleapis.com
metadata:
services: analyticsreporting.googleapis.com
reason: SERVICE_CONFIG_NOT_FOUND_OR_PERMISSION_DENIED
Investigation and Root Cause Analysis
We performed extensive troubleshooting and confirmed this is not a standard configuration error. We verified the following:
- User has the Owner IAM Role
- Project is linked to an active and paying Billing Account
- Organization Policies are non-restrictive (allowAll: true)
- Project is not part of any VPC Service Controls perimeter
- Project is correctly linked to a GA4 property
Next Steps
It appears that Google Cloud is preventing the enablement of the legacy analyticsreporting.googleapis.com API on projects where it wasn't already active.
The CRMint codebase shows it is listed as a dependency in terraform/apis.tf and used directly in backend workers like backend/jobs/workers/ga/ga_utils.py.
To ensure the future compatibility of CRMint and resolve this installation blocker for new users, is it possible to migrate from the legacy Analytics Reporting API v4 (analyticsreporting.googleapis.com) to the modern, GA4-native Google Analytics Data API v1 (analyticsdata.googleapis.com)?
The Issue
When running the standard install.sh script in a GCP project where the analyticsreporting.googleapis.com API has not been previously enabled, the installation fails. The script cannot enable this specific API, which appears to be a required dependency; blocking new installations of CRMint.
To Reproduce
Select a GCP project where analyticsreporting.googleapis.com has never been enabled.
Ensure the user has Owner permissions on the project.
Run the installation script: bash <(curl -Ls https://raw.githubusercontent.com/google-marketing-solutions/crmint/master/scripts/install.sh)
Observe the failure at the "Activate Cloud services" step.
Observed Error
The script fails with the following error, indicating a permissions issue that persists even for a Project Owner:
Investigation and Root Cause Analysis
We performed extensive troubleshooting and confirmed this is not a standard configuration error. We verified the following:
Next Steps
It appears that Google Cloud is preventing the enablement of the legacy analyticsreporting.googleapis.com API on projects where it wasn't already active.
The CRMint codebase shows it is listed as a dependency in terraform/apis.tf and used directly in backend workers like backend/jobs/workers/ga/ga_utils.py.
To ensure the future compatibility of CRMint and resolve this installation blocker for new users, is it possible to migrate from the legacy Analytics Reporting API v4 (analyticsreporting.googleapis.com) to the modern, GA4-native Google Analytics Data API v1 (analyticsdata.googleapis.com)?