[M] new call back
[wip]
This commit is contained in:
@@ -35,126 +35,4 @@ namespace tysdk
|
||||
GA_SDK = 9, //SDK相关事件
|
||||
GA_ABTest = 10, //abtest相关事件
|
||||
}
|
||||
|
||||
/*
|
||||
public class GAEvent : IDisposable
|
||||
{
|
||||
|
||||
private GATrackType eventType;
|
||||
private string eventName;
|
||||
bool AFSend = true;
|
||||
private JObject content = new JObject();
|
||||
public static Dictionary<string, string> extraContent = new Dictionary<string, string>();
|
||||
|
||||
public GAEvent(GATrackType eventType, string eventName, bool AFSend = true)
|
||||
{
|
||||
this.eventType = eventType;
|
||||
this.eventName = eventName;
|
||||
this.AFSend = AFSend;
|
||||
}
|
||||
|
||||
public GAEvent AddContent(string key, string value)
|
||||
{
|
||||
content[key] = value;
|
||||
return this; }
|
||||
|
||||
public GAEvent AddContent(string key, int value)
|
||||
{
|
||||
content[key] = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GAEvent AddContent(string key, bool value)
|
||||
{
|
||||
content[key] = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GAEvent AddContent(string key, float value)
|
||||
{
|
||||
content[key] = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GAEvent AddContent(string key, JToken value)
|
||||
{
|
||||
content[key] = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
foreach (var item in extraContent)
|
||||
{
|
||||
content[item.Key] = item.Value;
|
||||
}
|
||||
|
||||
string msg = content.ToString();
|
||||
if (msg == String.Empty) return;
|
||||
|
||||
if (AFSend)
|
||||
{
|
||||
SendAfEvent(eventType,eventName,msg);
|
||||
}
|
||||
|
||||
TYSdkFacade.Instance.EventTrack((int)eventType, eventName, msg);
|
||||
|
||||
content.RemoveAll();
|
||||
}
|
||||
|
||||
private void SendAfEvent(GATrackType type,string eventName,string logMessage)
|
||||
{
|
||||
Dictionary<string, string> eventValues = new Dictionary<string, string>();
|
||||
eventValues.Add("GA_TYPE", type.ToString());
|
||||
eventValues.Add(eventName, logMessage);
|
||||
AppsFlyer.sendEvent(AFInAppEvents.GA, eventValues);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
*GA_TRACK(默认类型)
|
||||
*GA_CION(金流相关事件)
|
||||
*GA_PAY(支付相关事件)
|
||||
*GA_GAME(游戏行为)
|
||||
*GA_LOGIN(登录注册相关事件)
|
||||
*GA_PUSH(推送相关事件)
|
||||
*GA_ADBOX(adbox相关事件)
|
||||
*GA_PREFORMANCE(性能上报相关事件)
|
||||
*GA_SDK(SDK相关事件)
|
||||
*GA_ABTest(abtest相关事件)
|
||||
*GA_PROFILE(设置用户特征
|
||||
*/
|
||||
//TOD SDK
|
||||
/*
|
||||
public static GAEvent TackEvent(string eventName, bool afSend = true)
|
||||
{
|
||||
return new GAEvent(GATrackType.GA_TRACK, eventName, afSend);
|
||||
}
|
||||
|
||||
public static GAEvent PushEvent(string eventName, bool afSend = true)
|
||||
{
|
||||
return new GAEvent(GATrackType.GA_PUSH, eventName, afSend);
|
||||
}
|
||||
|
||||
public static GAEvent CionEvent(string eventName, bool afSend = true)
|
||||
{
|
||||
return new GAEvent(GATrackType.GA_CION, eventName, afSend);
|
||||
}
|
||||
|
||||
public static GAEvent PayEvent(string eventName, bool afSend = true)
|
||||
{
|
||||
return new GAEvent(GATrackType.GA_PAY, eventName, afSend);
|
||||
}
|
||||
|
||||
public static GAEvent GameEvent(string eventName, bool afSend = true)
|
||||
{
|
||||
return new GAEvent(GATrackType.GA_GAME, eventName, afSend);
|
||||
}
|
||||
|
||||
public static GAEvent LoginEvent(string eventName, bool afSend = true)
|
||||
{
|
||||
return new GAEvent(GATrackType.GA_LOGIN, eventName, afSend);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user