Our Unreal Engine plugin, “Google Analytics Measurement Protocol”, offers a convenient “Configure Now” button to automatically set it as the default Analytics Provider for your project. However, due to a known issue with the Unreal Engine method FAnalytics::Get().WriteConfigValueToIni(), this automatic configuration may encounter file locking problems when your project is under Version Control Systems that support file locking (such as Subversion or Perforce).
This manifests itself with the plugin configuration being unchanged again and needing to be re-configured after using the “Configure Now” button and restarting Unreal Engine as required.
The issue arises because Unreal Engine fails to lock the configuration file, preventing it from being writable, which in turn blocks the plugin from saving changes. As a result, the automatic configuration might not work as intended.
Before clicking “Configure Now”, manually lock the configuration file to ensure it is writable, using the tools provided by your Version Control System. This will allow Unreal Engine to successfully write the necessary configuration changes.
If automatic locking is not feasible, manually edit the configuration file <PROJECT_ROOT>\Config\DefaultEngine.ini
by adding the following sections:
[Analytics] ProviderModuleName=GoogleAnalyticsMP GAMP_Protocol=GA4_gtag GAMP_TrackingID=...your Measurement ID for the Shipping configuration... [AnalyticsDebug] ProviderModuleName=GoogleAnalyticsMP GAMP_Protocol=GA4_gtag GAMP_TrackingID=...your Measurement ID for the Debug configuration... [AnalyticsTest] ProviderModuleName=GoogleAnalyticsMP GAMP_Protocol=GA4_gtag GAMP_TrackingID=...your Measurement ID for the Test configuration... [AnalyticsDevelopment] ProviderModuleName=GoogleAnalyticsMP GAMP_Protocol=GA4_gtag GAMP_TrackingID=...your Measurement ID for the Development configuration... [AnalyticsPIE] ProviderModuleName=GoogleAnalyticsMP GAMP_Protocol=GA4_gtag GAMP_TrackingID=...your Measurement ID for the Play-In-Editor configuration...
Instructions
Config\DefaultEngine.ini
.DefaultEngine.ini
in a text editor; copy and paste the provided configuration settings into the file; replace …your Measurement ID…
with the appropriate Measurement ID for each configuration.Following these steps will ensure that the “Google Analytics Measurement Protocol” plugin is correctly configured, even in environments using file-locking version control systems. If you encounter further issues, feel free to reach out to our support team for additional assistance.