Facebook Sherlock Analytics Service
Overview
This is an analytics service that integrates Facebook analytics with the Sherlock module. For detailed information, please refer to https://matchinghamgames.gitlab.io/docs/sherlock-analytics/.
Installing
- Import package from Package Manager UI.
- Make sure you have the appropriate Facebook SDK installed.
- Ensure Facebook Bridge dependency is properly configured.
API & Details
-
SendCustom(eventName: string, parameters: IDictionary<string, object> (null))
: Allows sending a custom, self styled analytics event to Facebook. Most of the events are sent with this method. -
SetUserId(userId: string)
: Set user id for the current user. This is useful for tracking user data across Facebook platforms. -
SendAppOpen(extraParameters: IDictionary<string, object> (null))
: When game initialization is complete, this event should be sent to Facebook analytics. -
SendCustomInAppPurchase(token: string, itemId: string, currencyCode: string, price: float, extraParameters: IDictionary<string, object> (null))
: Track in-app purchases through Facebook analytics. -
SendLevelStart(levelName: string, extraParameters: IDictionary<string, object> (null))
: Send level start events to Facebook analytics. -
SendLevelEnd(levelName: string, success: bool, extraParameters: IDictionary<string, object> (null))
: Send level completion events to Facebook analytics.
Dependencies
- Handyman (v5.8.2+)
- Facebook Bridge (v3.2.0+)
- Sherlock Analytics Core (v11.2.0+)
- Unity (v2022.3+)
- Logger (v2.1.0+)
Notes
- The service includes timeout logic when Facebook hasn't been initialized yet.
- Compatible with log4net when enabled.