- Support tracking for game unity (Firebase Analytic, Adjust and AppsFlyer)
for version 1.0.3
"com.wolf-org.tracking":"https://github.com/unity-package/app-tracking-unity.git#1.0.3",
- Add define symbols
VIRTUESKY_FIREBASE_ANALYTIC
to use (Get Firebase Analytic Sdk) - Tracking event
static void TrackEvent(string eventName)
static void TrackEvent(string eventName, string parameterName, string parameterValue)
static void TrackEvent(string eventName, Dictionary<string, string> dictParameters)
static void TrackEvent(string eventName, Parameter[] parameters)
Example
void TrackNoParam()
{
FirebaseTracking.TrackEvent("WinGame");
}
/// <summary>
/// parameter_name: level
/// parameter_value: level_1
/// </summary>
void TrackOneParam()
{
FirebaseTracking.TrackEvent("WinGame", "level", "level_1");
}
void TrackHasPramDict()
{
Dictionary<string, string> dict = new Dictionary<string, string>();
dict.Add("level", "level_1");
dict.Add("level", "level_2");
dict.Add("level", "level_3");
FirebaseTracking.TrackEvent("WinGame", dict);
}
void TrackHasPram()
{
Parameter[] parameters = new[]
{
new Parameter("level", "level_1"),
new Parameter("level", "level_2"),
new Parameter("level", "level_3")
};
FirebaseTracking.TrackEvent("WinGame", parameters);
}
- Tracking ads revenue
static void FirebaseAnalyticTrackRevenue(double value, string network, string unitId, string format, string adNetwork)
Example
void TrackingRevenue()
{
FirebaseAnalyticTrackingRevenue.FirebaseAnalyticTrackRevenue(...);
}
- Add define symbol
VIRTUESKY_ADJUST
to use (Get Adjust Sdk) - Tracking event
static void TrackEvent(string eventToken)
Example
void TrackingEventAdjust()
{
AdjustTracking.TrackEvent("asdwdsfwa");
}
- Tracking ads revenue
static void AdjustTrackRevenue(double value, string network, string unitId, string placement, string adNetwork)
Example
void TrackingRevenue()
{
AdjustTrackingRevenue.AdjustTrackRevenue(...);
}
- Add define symbol
VIRTUESKY_APPSFLYER
to use (Get Appsflyer Sdk , Get AppsFlyer AdRevenue) - Tracking event
static void TrackEvent(string eventName)
static void TrackEvent(string eventName, string parameterName, string parameterValue)
static void TrackEvent(string eventName, Dictionary<string, string> eventValues)
Example
void TrackNoParam()
{
AppsFlyerTracking.TrackEvent("WinGame");
}
/// <summary>
/// parameter_name: level
/// parameter_value: level_1
/// </summary>
void TrackOneParam()
{
AppsFlyerTracking.TrackEvent("WinGame", "level", "level_1");
}
void TrackHasPramDict()
{
Dictionary<string, string> dict = new Dictionary<string, string>();
dict.Add("level", "level_1");
dict.Add("level", "level_2");
dict.Add("level", "level_3");
AppsFlyerTracking.TrackEvent("WinGame", dict);
}
- Tracking ads revenue
static void AppsFlyerTrackRevenueAd(double value, string network, string unitId, string format, string adNetwork)
Example
void TrackingRevenue()
{
AppsFlyerTrackingRevenue.AppsFlyerTrackRevenueAd(...);
}
- Tracking iap revenue
Add define symbol
VIRTUESKY_IAP
to use
static void AppFlyerTrackingRevenueInAppPurchase(Product product)
Example
void TrackingRevenue(Product productIAP)
{
AppsFlyerTrackingRevenue.AppFlyerTrackingRevenueInAppPurchase(productIAP);
}
- Tracking ad revenue (If calling
Track Revenue
throughApp Tracking
, revenue will be tracked in all of Firebase Analytics, Adjust, and AppsFlyer)
static void TrackRevenue(double value, string network, string unitId, string format, string adNetwork)
Example
void TrackingRevenue()
{
AppTracking.TrackRevenue(...);
}
- Firebase tracking ATT Results IOS (App Tracking Transparency)
- Require:
"com.unity.ads.ios-support": "1.2.0"
static void FirebaseAnalyticTrackATTResult(int status)
Example
void AppTrackingTransparency()
{
if (ATTrackingStatusBinding.GetAuthorizationTrackingStatus() ==
ATTrackingStatusBinding.AuthorizationTrackingStatus.NOT_DETERMINED)
{
ATTrackingStatusBinding.RequestAuthorizationTracking(AppTracking.FirebaseAnalyticTrackATTResult);
}
}