示例#1
0
    /// <summary>
    /// 广告播放开始埋点(此方法必须与Event_Ad_End函数成对使用,否则不会发送到友盟)
    /// </summary>
    /// <param name="_adTeam">广告商</param>
    /// <param name="_AdPlayType">广告类型</param>
    public void Event_Ad_Start(string _adTeam, AdPlayType _AdPlayType, bool _clear)
    {
        string AdPlayType = _AdPlayType.ToString();

        //记录前清空缓存
        AdDic.Clear();

        //开始记录埋点
        string adPlayMsg = "设备ID:" + deveceId + " | 广告商:" + _adTeam + " | 广告类型:" + _AdPlayType + " | 播放时间:" + System.DateTime.Now;

        AllSDKManager.SDKDebug(Name + "设备ID:" + deveceId + " | 广告商:" + _adTeam + " | 广告类型:" + _AdPlayType + " | 播放时间:" + System.DateTime.Now);
        AdDic[_adTeam] = adPlayMsg;
    }
示例#2
0
    /// <summary>
    /// 广告播放结束埋点(此方法必须与Event_Ad_Start函数成对使用,否则不会发送到友盟)
    /// 注:成功使用此方法
    /// </summary>
    public void Event_Ad_End(string _adTeam, AdPlayType _AdPlayType)
    {
        if (_AdPlayType == AdPlayType.Banner)
        {
            if (adBuryData_Banner.adTeam.Count > 3)
            {
                adBuryData_Banner.playTime.Add(System.DateTime.Now + "");
            }
            adBuryData_Banner.adTeam.Add(_adTeam);
            adBuryData_Banner.adPlayType.Add(AdPlayType.Banner.ToString());
            adBuryData_Banner.playResult.Add("1");
            adBuryData_Banner.failed.Add("");
            adBuryData_Banner.closeTime = System.DateTime.Now + "";
        }
        else
        {
            if (adBuryData.adTeam.Count > 3)
            {
                adBuryData.playTime.Add(System.DateTime.Now + "");
            }
            adBuryData.adTeam.Add(_adTeam);
            adBuryData.adPlayType.Add(_AdPlayType.ToString());
            adBuryData.playResult.Add("1");
            adBuryData.failed.Add("");
            adBuryData.closeTime = System.DateTime.Now + "";
            UpLoad(adBuryData);
        }

        //if (_AdPlayType == AdPlayType.Banner)
        //{
        //    adBuryData_Banner.adTeam.Add(_adTeam);
        //    adBuryData_Banner.adPlayType.Add(AdPlayType.Banner.ToString());
        //    adBuryData_Banner.playResult.Add("1");
        //    adBuryData_Banner.failed.Add("");
        //    adBuryData_Banner.closeTime = System.DateTime.Now + "";
        //    UpLoad(adBuryData_Banner);

        //}
        //else
        //{
        //    adBuryData.playResult.Add("1");
        //    adBuryData.closeTime = System.DateTime.Now + "";
        //    adBuryData.failed.Add("");
        //    UpLoad(adBuryData);
        //}
    }
示例#3
0
 /// <summary>
 /// 广告播放结束埋点(此方法必须与Event_IAP_Start函数成对使用,否则不会发送到友盟)
 ///  注:失败使用此方法
 /// </summary>
 /// <param name="_failed">失败原因</param>
 public void Event_Ad_End(string _adTeam, AdPlayType _AdPlayType, string _failed = "")
 {
     if (_AdPlayType == AdPlayType.Banner)
     {
         //if (_failed == "no")
         //{
         //    UpLoad(adBuryData_Banner);
         //}
         //else
         //{
         if (adBuryData_Banner.adTeam.Count > 3)
         {
             adBuryData_Banner.playTime.Add(System.DateTime.Now + "");
         }
         adBuryData_Banner.adTeam.Add(_adTeam);
         adBuryData_Banner.adPlayType.Add(AdPlayType.Banner.ToString());
         adBuryData_Banner.playResult.Add("0");
         adBuryData_Banner.closeTime = "";
         adBuryData_Banner.failed.Add(_failed);
         //}
     }
     else
     {
         if (_failed == "no")
         {
             UpLoad(adBuryData);
         }
         else
         {
             if (adBuryData.adTeam.Count > 3)
             {
                 adBuryData.playTime.Add(System.DateTime.Now + "");
             }
             adBuryData.adTeam.Add(_adTeam);
             adBuryData.adPlayType.Add(_AdPlayType.ToString());
             adBuryData.playResult.Add("0");
             adBuryData.closeTime = "";
             adBuryData.failed.Add(_failed);
         }
     }
     //if (_AdPlayType == AdPlayType.Banner)
     //{
     //    adBuryData_Banner.adTeam.Add(_adTeam);
     //    adBuryData_Banner.adPlayType.Add(AdPlayType.Banner.ToString());
     //    adBuryData_Banner.playResult.Add("0");
     //    adBuryData_Banner.closeTime = "";
     //}
     //else
     //{
     //    adBuryData.playResult.Add("0");
     //    adBuryData.closeTime = "";
     //}
     //if (_failed == "no")
     //{
     //    if (_AdPlayType == AdPlayType.Banner)
     //    {
     //        adBuryData_Banner.failed.Add("no can used team");
     //        UpLoad(adBuryData_Banner);
     //    }
     //    else
     //    {
     //        adBuryData.failed.Add("no can used team");
     //        UpLoad(adBuryData);
     //    }
     //}
     //else
     //{
     //    if (_AdPlayType == AdPlayType.Banner)
     //        adBuryData_Banner.failed.Add(_failed);
     //    else
     //        adBuryData.failed.Add(_failed);
     //}
 }