This topic discusses solution to a typical issue you might experience with Google Analytics during deployment.
Affected products and versions
- Magento Commerce Cloud, all versions
When deploying your code across environments, the build and deploy scripts verify the
master/production/staging branch is deployed to keep Google Analytics enabled. When deploying develop (or child) branches of master to developer environments (Integration), the deploy script disables Google Analytics.
This is a working as an intended feature to ensure developer data and interactions are not sent to or tracked by Google Analytics.
If you want to have Google Analytics always enabled, set the deploy variable
ENABLE_GOOGLE_ANALYTICS = true, as described in Deploy variables.