A unified analytics middleware for Unity supporting Firebase, AppMetrica, and GameAnalytics with GDPR compliance and cross-platform support.
- Google External Dependency Manager
- Google User Messaging Platform
- Firebase Core
- Firebase Analytics
- Firebase Crashlytics
After installing the package and adding your chosen analytics SDKs, initialize the middleware in your code:
using FlyingAcorn.Analytics;
using System.Collections.Generic;
// Optional: Enable debug mode (disable in production)
AnalyticsManager.SetDebugMode(true);
// Optional: Set user identifier
AnalyticsManager.SaveUserIdentifier("custom_user_id");
// Optional: Set GDPR consent
AnalyticsManager.SetGDPRConsent(true);
// Optional: Set target store
AnalyticsManager.SetStore(BuildData.Constants.Store.GooglePlay);
// Initialize with your chosen analytics services
AnalyticsManager.Initialize(new List<IAnalytics>
{
new GameAnalyticsEvents(),
new FirebaseEvents(),
new AppMetricaEvents("YOUR_APPMETRICA_API_KEY")
});See DemoInitCall scene within Demo folder for more details.