iOS finder adjust event
This commit is contained in:
		
							parent
							
								
									4a4c20b6ba
								
							
						
					
					
						commit
						bf49d422c9
					
				|  | @ -184,7 +184,7 @@ public class JoypacStaticBuildPostProcessor | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| #if IssuePerson | #if IssuePerson | ||||||
|         proj.AddBuildProperty(target, "OTHER_LINKER_FLAGS", "-ObjC"); |         proj.AddBuildProperty(targetMain, "OTHER_LDFLAGS", "-ObjC"); | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|         File.WriteAllText(projPath, proj.WriteToString()); |         File.WriteAllText(projPath, proj.WriteToString()); | ||||||
|  | @ -213,6 +213,9 @@ public class JoypacStaticBuildPostProcessor | ||||||
|         plist.root.SetBoolean("Identity", false); |         plist.root.SetBoolean("Identity", false); | ||||||
|         plist.root.SetBoolean("LegalName", false); |         plist.root.SetBoolean("LegalName", false); | ||||||
| 
 | 
 | ||||||
|  |         plist.root.SetString("BytePlusAppId", "353656"); | ||||||
|  |         plist.root.SetBoolean("isChina", true); | ||||||
|  |          | ||||||
|         plist.root.SetString("KlevinApplicationIdentifier", ""); |         plist.root.SetString("KlevinApplicationIdentifier", ""); | ||||||
| 
 | 
 | ||||||
|         File.WriteAllText(plistPath, plist.WriteToString()); |         File.WriteAllText(plistPath, plist.WriteToString()); | ||||||
|  |  | ||||||
|  | @ -4,6 +4,8 @@ using UnityEngine; | ||||||
| using System.Runtime.InteropServices; | using System.Runtime.InteropServices; | ||||||
| using System; | using System; | ||||||
| 
 | 
 | ||||||
|  | using LitJson; | ||||||
|  | 
 | ||||||
| public class JoypacAdClient : MonoBehaviour | public class JoypacAdClient : MonoBehaviour | ||||||
| { | { | ||||||
| 
 | 
 | ||||||
|  | @ -107,10 +109,38 @@ public class JoypacAdClient : MonoBehaviour | ||||||
|     [DllImport("__Internal")] |     [DllImport("__Internal")] | ||||||
|     private static extern void setDataReportEnviroment(string enviroment); |     private static extern void setDataReportEnviroment(string enviroment); | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     // Finder数据埋点上传 | ||||||
|  |     [DllImport("__Internal")] | ||||||
|  |     private static extern void uploadEvent(string eventId, string eventParams); | ||||||
|  | 
 | ||||||
|  |     // Finder用户属性设置 | ||||||
|  |     [DllImport("__Internal")] | ||||||
|  |     private static extern void profileSet(string profileParams); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     //Finder相关 | ||||||
|  |     public void UploadEvent(string eventId, string eventParams) | ||||||
|  |     { | ||||||
|  | 
 | ||||||
|  |         uploadEvent(eventId, eventParams); | ||||||
|  | 
 | ||||||
|  |     } | ||||||
|  |     public void ProfileSet(string profileParams) | ||||||
|  |     { | ||||||
|  | 
 | ||||||
|  |         profileSet(profileParams); | ||||||
|  | 
 | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|     //设置 上报环境 |     //设置 上报环境 | ||||||
|     public void SetDataReportEnviroment(string enviroment) |     public void SetDataReportEnviroment(string enviroment) | ||||||
|     { |     { | ||||||
| 
 | #if UNITY_EDITOR | ||||||
|  |         return; | ||||||
|  | #endif | ||||||
|         setDataReportEnviroment(enviroment); |         setDataReportEnviroment(enviroment); | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
|  | @ -186,6 +216,8 @@ public class JoypacAdClient : MonoBehaviour | ||||||
| 
 | 
 | ||||||
|         Debug.Log("oc call unity ReceiveExtraData " + extraData); |         Debug.Log("oc call unity ReceiveExtraData " + extraData); | ||||||
|         JoypacUtils.extraData = extraData; |         JoypacUtils.extraData = extraData; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     //unity 发送adjust回传字段给OC |     //unity 发送adjust回传字段给OC | ||||||
|  | @ -342,9 +374,6 @@ public class JoypacAdClient : MonoBehaviour | ||||||
|         showRewardVideoWithPlacementId(unitId, eventPosition); |         showRewardVideoWithPlacementId(unitId, eventPosition); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|     #endregion |     #endregion | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @ -365,59 +394,104 @@ public class JoypacAdClient : MonoBehaviour | ||||||
|     #endregion |     #endregion | ||||||
| 
 | 
 | ||||||
|     #region intersititalCallback |     #region intersititalCallback | ||||||
|     public void JoypacIntersititalAdLoad() |     public void JoypacIntersititalAdLoad(string json) | ||||||
|     { |     { | ||||||
|         LogTool.DebugLog("joypac oc call unity ivloaded"); |         LogTool.DebugLog("joypac oc call unity ivloaded " + json); | ||||||
|         JoypacSDKAdapter.Instance.onInterstitialAdLoad(); |         JoypacSDKAdapter.Instance.onInterstitialAdLoad(); | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacIntersititalAdLoadFail() |     public void JoypacIntersititalAdLoadFail(string json) | ||||||
|     { |     { | ||||||
|         LogTool.DebugLog("joypac oc call unity ivloadfail"); |         LogTool.DebugLog("joypac oc call unity ivloadfail " + json); | ||||||
| 
 | 
 | ||||||
|         JoypacSDKAdapter.Instance.onInterstitialAdLoadFail(); |         JoypacSDKAdapter.Instance.onInterstitialAdLoadFail(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacIntersititalAdShow() |     public void JoypacIntersititalAdShow(string json) | ||||||
|     { |     { | ||||||
| 
 | 
 | ||||||
|         LogTool.DebugLog("joypac oc call unity ivshow"); |         LogTool.DebugLog("joypac oc call unity ivshow " + json); | ||||||
|         JoypacSDKAdapter.Instance.onInterstitialAdShow(); |         JoypacSDKAdapter.Instance.onInterstitialAdShow(); | ||||||
|  | 
 | ||||||
|  |         Debug.Log("adjust interstitial show打点准备"); | ||||||
|  |         if (!string.IsNullOrEmpty(json)) | ||||||
|  |         { | ||||||
|  |             Debug.Log("adjust interstitial show打点,json回调不为空"); | ||||||
|  |             //规避安卓两次回调 | ||||||
|  |             if (!JoypacAdManager.IntersShow) | ||||||
|  |             { | ||||||
|  |                 Debug.Log("adjust interstitial show打点,当前次可用"); | ||||||
|  |                 JoypacAdManager.IntersShow = true; | ||||||
|  | 
 | ||||||
|  |                 Dictionary<string, object> jsonTemp = new Dictionary<string, object>(); | ||||||
|  |                 jsonTemp = JsonMapper.ToObject<Dictionary<string, object>>(json); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |                 Debug.Log("finder 插屏展示准备"); | ||||||
|  | 
 | ||||||
|  |                 JoypacAnalyticsManager.Instance.APPAdsShow(jsonTemp); | ||||||
|  |                 Debug.Log("finder 插屏展示结束"); | ||||||
|  | 
 | ||||||
|  |                 string newsss = jsonTemp["price_int"].ToString(); | ||||||
|  |                 double newEcpm = double.Parse(newsss); | ||||||
|  |                 Debug.Log("newEcpm:::" + newEcpm); | ||||||
|  | 
 | ||||||
|  |                JoypacAnalyticsManager.DesignEvent_ECPM(newEcpm, jsonTemp["currency"].ToString(), ConstStringKey.Instance.IV_ECPM); | ||||||
|  | 
 | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         Debug.Log("adjust interstitial show打点结束"); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacIntersititalAdsShowFail() |     public void JoypacIntersititalAdsShowFail(string json) | ||||||
|     { |     { | ||||||
|         LogTool.DebugLog("joypac oc call unity ivshowfail"); |         LogTool.DebugLog("joypac oc call unity ivshowfail " + json); | ||||||
|         JoypacSDKAdapter.Instance.onInterstitialAdFailedToShow(); |         JoypacSDKAdapter.Instance.onInterstitialAdFailedToShow(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacIntersititalAdClose() |     public void JoypacIntersititalAdClose(string json) | ||||||
|     { |     { | ||||||
|         LogTool.DebugLog("joypac oc call unity ivclose"); |         LogTool.DebugLog("joypac oc call unity ivclose " + json); | ||||||
|         JoypacSDKAdapter.Instance.onInterstitialAdClose(); |         JoypacSDKAdapter.Instance.onInterstitialAdClose(); | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacIntersititalAdClick() |     public void JoypacIntersititalAdClick(string json) | ||||||
|     { |     { | ||||||
|  |         Debug.Log("joypac " + json); | ||||||
|         JoypacSDKAdapter.Instance.onInterstitialAdClick(); |         JoypacSDKAdapter.Instance.onInterstitialAdClick(); | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  |         Debug.Log("finder Interstitial click 准备"); | ||||||
|  |         if (!string.IsNullOrEmpty(json)) | ||||||
|  |         { | ||||||
|  |             Debug.Log("finder Interstitial click 开始"); | ||||||
|  |             Dictionary<string, object> jsonTemp = new Dictionary<string, object>(); | ||||||
|  | 
 | ||||||
|  |             jsonTemp = JsonMapper.ToObject<Dictionary<string, object>>(json); | ||||||
|  |             JoypacAnalyticsManager.Instance.APPAdsClick(jsonTemp); | ||||||
|  |         } | ||||||
|  |         Debug.Log("finder Interstitial click 结束"); | ||||||
|  | 
 | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacIntersititalAdsEndPlaying() |     public void JoypacIntersititalAdsEndPlaying(string json) | ||||||
|     { |     { | ||||||
|  |         Debug.Log("joypac " + json); | ||||||
|         JoypacSDKAdapter.Instance.onInterstitialAdEndPlayingVideo(); |         JoypacSDKAdapter.Instance.onInterstitialAdEndPlayingVideo(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacIntersititalAdFailedToPlay() |     public void JoypacIntersititalAdFailedToPlay(string json) | ||||||
|     { |     { | ||||||
|  |         Debug.Log("joypac " + json); | ||||||
|         JoypacSDKAdapter.Instance.onInterstitialAdFailedToPlayVideo(); |         JoypacSDKAdapter.Instance.onInterstitialAdFailedToPlayVideo(); | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacIntersititalAdsStartPlayVideo() |     public void JoypacIntersititalAdsStartPlayVideo(string json) | ||||||
|     { |     { | ||||||
|  |         Debug.Log("joypac " + json); | ||||||
|         JoypacSDKAdapter.Instance.onInterstitialAdStartPlayingVideo(); |         JoypacSDKAdapter.Instance.onInterstitialAdStartPlayingVideo(); | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
|  | @ -425,51 +499,110 @@ public class JoypacAdClient : MonoBehaviour | ||||||
|     #endregion |     #endregion | ||||||
| 
 | 
 | ||||||
|     #region videoCallback |     #region videoCallback | ||||||
|     public void JoypacVideoAdLoaded() |     public void JoypacVideoAdLoaded(string json) | ||||||
|     { |     { | ||||||
|         LogTool.DebugLog("joypac oc call unity videoloaded"); |         LogTool.DebugLog("joypac oc call unity videoloaded " + json); | ||||||
|         JoypacSDKAdapter.Instance.onRewardedVideoAdLoaded(); |         JoypacSDKAdapter.Instance.onRewardedVideoAdLoaded(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacVideoAdLoadFail() |     public void JoypacVideoAdLoadFail(string json) | ||||||
|     { |     { | ||||||
|         LogTool.DebugLog("joypac oc call unity videoloadfail"); |         LogTool.DebugLog("joypac oc call unity videoloadfail " + json); | ||||||
|         JoypacSDKAdapter.Instance.onRewardedVideoAdLoadFail(); |         JoypacSDKAdapter.Instance.onRewardedVideoAdLoadFail(); | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacVideoAdPlayStart() |     public void JoypacVideoAdPlayStart(string json) | ||||||
|     { |     { | ||||||
|         LogTool.DebugLog("joypac oc call unity videostartplay"); |         LogTool.DebugLog("joypac oc call unity videostartplay = " + json); | ||||||
|         JoypacSDKAdapter.Instance.onRewardedVideoAdPlayStart(); |         JoypacSDKAdapter.Instance.onRewardedVideoAdPlayStart(); | ||||||
|  | 
 | ||||||
|  |         Debug.Log("adjust reward show打点准备"); | ||||||
|  |         if (!string.IsNullOrEmpty(json)) | ||||||
|  |         { | ||||||
|  |             Debug.Log("adjust reward show打点,json回调不为空"); | ||||||
|  |             //规避安卓两次回调 | ||||||
|  |             if (!JoypacAdManager.VideoShow) | ||||||
|  |             { | ||||||
|  |                 Debug.Log("adjust reward show打点,当前次可用"); | ||||||
|  |                 JoypacAdManager.VideoShow = true; | ||||||
|  | 
 | ||||||
|  |                 Dictionary<string, object> jsonTemp = new Dictionary<string, object>(); | ||||||
|  |                 jsonTemp = JsonMapper.ToObject<Dictionary<string, object>>(json); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |                 JoypacAnalyticsManager.Instance.APPAdsShow(jsonTemp); | ||||||
|  |                 Debug.Log("finder 激励视频展示结束"); | ||||||
|  |                 string newsss = jsonTemp["price_int"].ToString(); | ||||||
|  |                 double newEcpm = double.Parse(newsss); | ||||||
|  |                 Debug.Log("newEcpm:::" + newEcpm); | ||||||
|  | 
 | ||||||
|  |               JoypacAnalyticsManager.DesignEvent_ECPM(newEcpm, jsonTemp["currency"].ToString(), ConstStringKey.Instance.RV_ECPM); | ||||||
|  | 
 | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         Debug.Log("adjust reward show打点结束"); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacVideoAdPlayEnd() |     public void JoypacVideoAdPlayEnd(string json) | ||||||
|     { |     { | ||||||
|         LogTool.DebugLog("joypac oc call unity playend"); |         LogTool.DebugLog("joypac oc call unity playend " + json); | ||||||
|         JoypacSDKAdapter.Instance.onRewardedVideoAdPlayEnd(); |         JoypacSDKAdapter.Instance.onRewardedVideoAdPlayEnd(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacVideoAdPlayFail() |     public void JoypacVideoAdPlayFail(string json) | ||||||
|     { |     { | ||||||
| 
 | 
 | ||||||
|         LogTool.DebugLog("joypac oc call unity videoplayfail"); |         LogTool.DebugLog("joypac oc call unity videoplayfail" + json); | ||||||
|         JoypacSDKAdapter.Instance.onRewardedVideoAdPlayFail(); |         JoypacSDKAdapter.Instance.onRewardedVideoAdPlayFail(); | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacVideoAdPlayClosed(string isRewardStr) |     public void JoypacVideoAdPlayClosed(string isRewardStr) | ||||||
|     { |     { | ||||||
| 
 |         LogTool.DebugLog("joypac " + isRewardStr); | ||||||
|         bool isReward = Convert.ToBoolean(isRewardStr); |         bool isReward = false; | ||||||
|         LogTool.DebugLog("oc call unity video close "); |         if (isRewardStr == "1") | ||||||
|  |         { | ||||||
|  |             isReward = true; | ||||||
|  |         } | ||||||
|  |         LogTool.DebugLog("oc call unity video close + isReward:" + isReward); | ||||||
|         JoypacSDKAdapter.Instance.onRewardedVideoAdPlayClosed(isReward); |         JoypacSDKAdapter.Instance.onRewardedVideoAdPlayClosed(isReward); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     } | ||||||
|  |     public void JoypacVideoAdPlayRewarded(string json) | ||||||
|  |     { | ||||||
|  |         LogTool.DebugLog("joypac JoypacVideoAdPlayRewarded" + json); | ||||||
|  |         Debug.Log("finder Reward 奖励回调打点准备"); | ||||||
|  |         if (!string.IsNullOrEmpty(json)) | ||||||
|  |         { | ||||||
|  |             Dictionary<string, object> jsonTemp = new Dictionary<string, object>(); | ||||||
|  |             jsonTemp = JsonMapper.ToObject<Dictionary<string, object>>(json); | ||||||
|  | 
 | ||||||
|  |             Debug.Log("finder Reward App_Ads_Reward"); | ||||||
|  |             JoypacAnalyticsManager.Instance.AppAdsReward(jsonTemp); | ||||||
|  |         } | ||||||
|  |         Debug.Log("finder Reward 奖励回调打点结束"); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|     public void JoypacVideoAdPlayClicked() |     public void JoypacVideoAdPlayClicked(string json) | ||||||
|     { |     { | ||||||
|  |         LogTool.DebugLog("joypac " + json); | ||||||
| 
 | 
 | ||||||
|  |         Debug.Log("finder Reward click 准备"); | ||||||
|  |         if (!string.IsNullOrEmpty(json)) | ||||||
|  |         { | ||||||
|  |             Debug.Log("finder Reward click 开始"); | ||||||
|  |             Dictionary<string, object> jsonTemp = new Dictionary<string, object>(); | ||||||
|  | 
 | ||||||
|  |             jsonTemp = JsonMapper.ToObject<Dictionary<string, object>>(json); | ||||||
|  | 
 | ||||||
|  |             JoypacAnalyticsManager.Instance.aPPAdsShowAdType = "Reward"; | ||||||
|  |             JoypacAnalyticsManager.Instance.APPAdsClick(jsonTemp); | ||||||
|  |         } | ||||||
|  |         Debug.Log("finder Reward click 结束"); | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | @ -478,36 +611,62 @@ public class JoypacAdClient : MonoBehaviour | ||||||
| 
 | 
 | ||||||
|     #region bannerCallback |     #region bannerCallback | ||||||
| 
 | 
 | ||||||
|     public void JoypacBannerAdLoad() |     public void JoypacBannerAdLoad(string json) | ||||||
|     { |     { | ||||||
| 
 | 
 | ||||||
|         LogTool.DebugLog("joypac oc call unity bannerLoad"); |         LogTool.DebugLog("joypac oc call unity bannerLoad " + json); | ||||||
|         JoypacSDKAdapter.Instance.onNativeBannerAdLoaded(); |         JoypacSDKAdapter.Instance.onNativeBannerAdLoaded(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacBannerAdLoadFail() |     public void JoypacBannerAdLoadFail(string json) | ||||||
|     { |     { | ||||||
| 
 | 
 | ||||||
|         LogTool.DebugLog("joypac oc call unity bannerLoadFail"); |         LogTool.DebugLog("joypac oc call unity bannerLoadFail " + json); | ||||||
|         JoypacSDKAdapter.Instance.onNativeBannerAdLoadFail(); |         JoypacSDKAdapter.Instance.onNativeBannerAdLoadFail(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacBannerAdDidShow() |     public void JoypacBannerAdDidShow(string json) | ||||||
|     { |     { | ||||||
|         LogTool.DebugLog("joypac oc call unity bannerDidShow"); |         LogTool.DebugLog("joypac oc call unity bannerDidShow " + json); | ||||||
|         JoypacSDKAdapter.Instance.onNativeBannerAdImpressed(); |         JoypacSDKAdapter.Instance.onNativeBannerAdImpressed(); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |         Debug.Log("banner show打点准备"); | ||||||
|  |         if (!string.IsNullOrEmpty(json)) | ||||||
|  |         { | ||||||
|  |             Debug.Log("banner show打点,json回调不为空"); | ||||||
|  |             //规避安卓两次回调 | ||||||
|  |             if (!JoypacAdManager.BannerShow) | ||||||
|  |             { | ||||||
|  |                 Debug.Log("banner show打点,当前次可用"); | ||||||
|  |                 JoypacAdManager.BannerShow = true; | ||||||
|  | 
 | ||||||
|  |                 Dictionary<string, object> jsonTemp = new Dictionary<string, object>(); | ||||||
|  |                 jsonTemp = JsonMapper.ToObject<Dictionary<string, object>>(json); | ||||||
|  |                 JoypacAnalyticsManager.Instance.App_Banner_Show(jsonTemp); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         Debug.Log("banner show打点结束"); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacBannerAdDidClick() |     public void JoypacBannerAdDidClick(string json) | ||||||
|     { |     { | ||||||
| 
 | 
 | ||||||
|         LogTool.DebugLog("joypac oc call unity bannerDidClick"); |         LogTool.DebugLog("joypac oc call unity bannerDidClick " + json); | ||||||
|         JoypacSDKAdapter.Instance.onNativeBannerAdClicked(); |         JoypacSDKAdapter.Instance.onNativeBannerAdClicked(); | ||||||
| 
 | 
 | ||||||
|     } |         if (!string.IsNullOrEmpty(json)) | ||||||
|     public void JoypacBannerAdDidClickCloseButton() |  | ||||||
|         { |         { | ||||||
|         LogTool.DebugLog("joypac oc call unity bannerDidClickCloseButton"); |             Dictionary<string, object> jsonTemp = new Dictionary<string, object>(); | ||||||
|  |             jsonTemp = JsonMapper.ToObject<Dictionary<string, object>>(json); | ||||||
|  | 
 | ||||||
|  |             JoypacAnalyticsManager.Instance.App_Banner_Click(jsonTemp); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |     } | ||||||
|  |     public void JoypacBannerAdDidClickCloseButton(string json) | ||||||
|  |     { | ||||||
|  |         LogTool.DebugLog("joypac oc call unity bannerDidClickCloseButton " + json); | ||||||
|         JoypacSDKAdapter.Instance.onNativeBannerAdCloseButtonClicked(); |         JoypacSDKAdapter.Instance.onNativeBannerAdCloseButtonClicked(); | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
|  | @ -515,54 +674,54 @@ public class JoypacAdClient : MonoBehaviour | ||||||
|     #endregion |     #endregion | ||||||
| 
 | 
 | ||||||
|     #region nativeCallback |     #region nativeCallback | ||||||
|     public void JoypacNativeAdLoadFail() |     public void JoypacNativeAdLoadFail(string json) | ||||||
|     { |     { | ||||||
|         LogTool.DebugLog("joypac oc call unity nativeloadfail"); |         LogTool.DebugLog("joypac oc call unity nativeloadfail " + json); | ||||||
|         JoypacSDKAdapter.Instance.onNativeAdLoadFail(); |         JoypacSDKAdapter.Instance.onNativeAdLoadFail(); | ||||||
|     } |     } | ||||||
|     public void JoypacNativeAdLoaded() |     public void JoypacNativeAdLoaded(string json) | ||||||
|     { |     { | ||||||
|         LogTool.DebugLog("joypac oc call unity nativeloaded"); |         LogTool.DebugLog("joypac oc call unity nativeloaded " + json); | ||||||
|         JoypacSDKAdapter.Instance.onNativeAdLoaded(); |         JoypacSDKAdapter.Instance.onNativeAdLoaded(); | ||||||
|     } |     } | ||||||
|     public void JoypacNativeAdDidShow() |     public void JoypacNativeAdDidShow(string json) | ||||||
|     { |     { | ||||||
|         LogTool.DebugLog("joypac oc call unity nativedidshow"); |         LogTool.DebugLog("joypac oc call unity nativedidshow " + json); | ||||||
|         JoypacSDKAdapter.Instance.onNativeAdImpressed(); |         JoypacSDKAdapter.Instance.onNativeAdImpressed(); | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
|     public void JoypacNativeAdDidClick() |     public void JoypacNativeAdDidClick(string json) | ||||||
|     { |     { | ||||||
|         LogTool.DebugLog("joypac oc call unity nativedidclick"); |         LogTool.DebugLog("joypac oc call unity nativedidclick " + json); | ||||||
|         JoypacSDKAdapter.Instance.onNativeAdClicked(); |         JoypacSDKAdapter.Instance.onNativeAdClicked(); | ||||||
|     } |     } | ||||||
|     #endregion |     #endregion | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|     #region splashCallback |     #region splashCallback | ||||||
|     public void JoypacSplashAdLoaded() |     public void JoypacSplashAdLoaded(string json) | ||||||
|     { |     { | ||||||
|         Debug.Log("joypac oc call unity 开屏请求成功"); |         Debug.Log("joypac oc call unity 开屏请求成功 " + json); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacSplashAdLoadFail() |     public void JoypacSplashAdLoadFail(string json) | ||||||
|     { |     { | ||||||
|         Debug.Log("joypac oc call unity 开屏请求失败"); |         Debug.Log("joypac oc call unity 开屏请求失败 " + json); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacSplashAdDidShow() |     public void JoypacSplashAdDidShow(string json) | ||||||
|     { |     { | ||||||
|         Debug.Log("joypac oc call unity 展示开屏"); |         Debug.Log("joypac oc call unity 展示开屏 " + json); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacSplashAdDidClick() |     public void JoypacSplashAdDidClick(string json) | ||||||
|     { |     { | ||||||
|         Debug.Log("joypac oc call unity 点击开屏"); |         Debug.Log("joypac oc call unity 点击开屏 " + json); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public void JoypacSplashAdDidClose() |     public void JoypacSplashAdDidClose(string json) | ||||||
|     { |     { | ||||||
|         Debug.Log("joypac oc call unity 开屏关闭"); |         Debug.Log("joypac oc call unity 开屏关闭 " + json); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     #endregion |     #endregion | ||||||
|  |  | ||||||
|  | @ -182,6 +182,16 @@ public class ConstStringKey | ||||||
|     public string GAME_FINISH = "";//必填 |     public string GAME_FINISH = "";//必填 | ||||||
|     public string ADJUST_EVENT_RV24 = "h61tti";//必填 |     public string ADJUST_EVENT_RV24 = "h61tti";//必填 | ||||||
|     public string ADJUST_EVENT_RVIV24 = "n087kg";//必填 |     public string ADJUST_EVENT_RVIV24 = "n087kg";//必填 | ||||||
|  | 
 | ||||||
|  |     public string RV_ECPM = "p9gwke"; | ||||||
|  |     public string IV_ECPM = "csho1l"; | ||||||
|  |     public string EnterGame = ""; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     public const string ADJUST_LEVELCOUNT = ""; | ||||||
|  |     public const string ADJUST_FIRSTAD = "lzflg8"; | ||||||
|  |     public const string ADJUST_FIRSTLEVEL = "dspnce"; | ||||||
|  |     public const string ADJUST_FIRSTMAINPAGE = "om2nvg"; | ||||||
| #elif UNITY_ANDROID | #elif UNITY_ANDROID | ||||||
|     public string DEVICEINFO_IPHONE_TOKEN = "pj2o55";//必填 |     public string DEVICEINFO_IPHONE_TOKEN = "pj2o55";//必填 | ||||||
|     public string DEVICEINFO_IPAD_TOKEN = "a2txyw";//必填 |     public string DEVICEINFO_IPAD_TOKEN = "a2txyw";//必填 | ||||||
|  | @ -195,6 +205,17 @@ public class ConstStringKey | ||||||
|     public string GAME_FINISH = "";//必填 |     public string GAME_FINISH = "";//必填 | ||||||
|     public string ADJUST_EVENT_RV24 = "9mlkw2";//必填 |     public string ADJUST_EVENT_RV24 = "9mlkw2";//必填 | ||||||
|     public string ADJUST_EVENT_RVIV24 = "jwnqhw";//必填 |     public string ADJUST_EVENT_RVIV24 = "jwnqhw";//必填 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |      public string RV_ECPM = "jg4abn"; | ||||||
|  |     public string IV_ECPM = "wnsqf0"; | ||||||
|  |     public string EnterGame = ""; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     public const string ADJUST_LEVELCOUNT = ""; | ||||||
|  |     public const string ADJUST_FIRSTAD = "5601ah"; | ||||||
|  |     public const string ADJUST_FIRSTLEVEL = "6ymf40"; | ||||||
|  |     public const string ADJUST_FIRSTMAINPAGE = "gybndv"; | ||||||
| #endif | #endif | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -220,6 +220,13 @@ public class JoypacAnalyticsManager : MonoBehaviour | ||||||
| 
 | 
 | ||||||
|         Debug.Log("APPAdsShow========coming  adSource" + adSource.Count); |         Debug.Log("APPAdsShow========coming  adSource" + adSource.Count); | ||||||
| 
 | 
 | ||||||
|  |         if (PlayerPrefs.GetInt("ADJUST_FIRSTAD", 0) == 0) | ||||||
|  |         { | ||||||
|  |             LogEventToken(ConstStringKey.ADJUST_FIRSTAD); | ||||||
|  |             PlayerPrefs.SetInt("ADJUST_FIRSTAD", 1); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|         VolcanoReYunJson temp = new VolcanoReYunJson(); |         VolcanoReYunJson temp = new VolcanoReYunJson(); | ||||||
|         temp.eventname = "APP_Ads_Show"; |         temp.eventname = "APP_Ads_Show"; | ||||||
|         temp.values.Add("Come", aPPAdsShowCome); |         temp.values.Add("Come", aPPAdsShowCome); | ||||||
|  | @ -337,6 +344,24 @@ public class JoypacAnalyticsManager : MonoBehaviour | ||||||
| #endif | #endif | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     static public void DesignEvent_ECPM(double ecpm, string currency, string eventToken) | ||||||
|  |     { | ||||||
|  |         //#if UNITY_ANDROID | ||||||
|  |         //adjust新增事件:跟踪收入 | ||||||
|  |         AdjustEvent adjustEvent = new AdjustEvent(eventToken); | ||||||
|  |         adjustEvent.setRevenue(ecpm, currency); | ||||||
|  |         Adjust.trackEvent(adjustEvent); | ||||||
|  |         //#endif | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public void LogEventToken(string _eventToken) | ||||||
|  |     { | ||||||
|  |         if (string.IsNullOrEmpty(_eventToken)) return; | ||||||
|  | 
 | ||||||
|  |         Adjust.trackEvent(new AdjustEvent(_eventToken)); | ||||||
|  |         Debug.Log("Joypac LogEventWithLabel Adjust: " + _eventToken); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
|     private static bool updateEventToGA = false; |     private static bool updateEventToGA = false; | ||||||
|     public void Init() |     public void Init() | ||||||
|  | @ -683,6 +708,14 @@ public class JoypacAnalyticsManager : MonoBehaviour | ||||||
|         ReceiveAdJustData(json); |         ReceiveAdJustData(json); | ||||||
| 
 | 
 | ||||||
|         // ... |         // ... | ||||||
|  | 
 | ||||||
|  | #if JOYPAC_Volcano_OS && UNITY_IOS && !UNITY_EDITOR | ||||||
|  |         JoypacAdjustFinder joypacAdjustFinder = new JoypacAdjustFinder(attribution); | ||||||
|  |         string jsonFinder = JsonUtility.ToJson(joypacAdjustFinder); | ||||||
|  |         Debug.Log(jsonFinder); | ||||||
|  |         JoypacAdClient.Instance.ProfileSet(jsonFinder); | ||||||
|  | 
 | ||||||
|  | #endif | ||||||
|     } |     } | ||||||
| #if DEVELOPMENT_BUILD || ADJUST_TEST | #if DEVELOPMENT_BUILD || ADJUST_TEST | ||||||
|     public void EventSuccessCallback(AdjustEventSuccess eventSuccessData) |     public void EventSuccessCallback(AdjustEventSuccess eventSuccessData) | ||||||
|  | @ -875,7 +908,38 @@ public class JoypacAdjustAttribution | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | [Serializable] | ||||||
|  | public class JoypacAdjustFinder | ||||||
|  | { | ||||||
| 
 | 
 | ||||||
|  |     [SerializeField] | ||||||
|  |     public string adjust_trackerToken = ""; | ||||||
|  |     [SerializeField] | ||||||
|  |     public string adjust_adgroup = ""; | ||||||
|  |     [SerializeField] | ||||||
|  |     public string adjust_creative = ""; | ||||||
|  |     [SerializeField] | ||||||
|  |     public string adjust_adid = ""; | ||||||
|  |     [SerializeField] | ||||||
|  |     public string adjust_clickLabel = ""; | ||||||
|  |     [SerializeField] | ||||||
|  |     public string adjust_network = ""; | ||||||
|  |     [SerializeField] | ||||||
|  |     public string adjust_trackerName = ""; | ||||||
|  | 
 | ||||||
|  |     public JoypacAdjustFinder(AdjustAttribution attribution) | ||||||
|  |     { | ||||||
|  | 
 | ||||||
|  |         adjust_trackerToken = attribution.trackerToken; | ||||||
|  |         adjust_adgroup = attribution.adgroup; | ||||||
|  |         adjust_creative = attribution.creative; | ||||||
|  |         adjust_adid = attribution.adid; | ||||||
|  |         adjust_clickLabel = attribution.clickLabel; | ||||||
|  |         adjust_network = attribution.network; | ||||||
|  |         adjust_trackerName = attribution.trackerName; | ||||||
|  | 
 | ||||||
|  |     } | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -68,6 +68,11 @@ public class RecipeDetailView : MonoBehaviour | ||||||
|         { |         { | ||||||
|             JoypacAnalyticsManager.Instance.AppOperation(StaticStringsEvent.PlayGame,"", StaticStringsEvent.Make, "", data.id.ToString()); |             JoypacAnalyticsManager.Instance.AppOperation(StaticStringsEvent.PlayGame,"", StaticStringsEvent.Make, "", data.id.ToString()); | ||||||
| 
 | 
 | ||||||
|  |             if (PlayerPrefs.GetInt("ADJUST_FIRSTLEVEL", 0) == 0) | ||||||
|  |             { | ||||||
|  |                 JoypacAnalyticsManager.Instance.LogEventToken(ConstStringKey.ADJUST_FIRSTLEVEL); | ||||||
|  |                 PlayerPrefs.SetInt("ADJUST_FIRSTLEVEL", 1); | ||||||
|  |             } | ||||||
| 
 | 
 | ||||||
|             LocalCacheManager.Save(PopcornGameManager.PanDataTag, panSelector.SelectedPanData.Value); |             LocalCacheManager.Save(PopcornGameManager.PanDataTag, panSelector.SelectedPanData.Value); | ||||||
|             TransitionManager.Instance.LoadScene(GameScenes.Cooking); |             TransitionManager.Instance.LoadScene(GameScenes.Cooking); | ||||||
|  |  | ||||||
|  | @ -29,6 +29,13 @@ public class FooterManager : MonoBehaviour | ||||||
|         { |         { | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|  | 
 | ||||||
|  |         if (PlayerPrefs.GetInt("ADJUST_FIRSTMAINPAGE", 0) == 0) | ||||||
|  |         { | ||||||
|  |             JoypacAnalyticsManager.Instance.LogEventToken(ConstStringKey.ADJUST_FIRSTMAINPAGE); | ||||||
|  |             PlayerPrefs.SetInt("ADJUST_FIRSTMAINPAGE", 1); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|         var gameData = GameDataManager.GameData; |         var gameData = GameDataManager.GameData; | ||||||
|         var isTutorial = gameData.FinishedFlags.HasFlag(TutorialFlag.FirstPlay); |         var isTutorial = gameData.FinishedFlags.HasFlag(TutorialFlag.FirstPlay); | ||||||
|          |          | ||||||
|  |  | ||||||
|  | @ -34,7 +34,6 @@ GraphicsSettings: | ||||||
|   - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} |   - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} | ||||||
|   - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} |   - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} | ||||||
|   - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} |   - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} | ||||||
|   - {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0} |  | ||||||
|   m_PreloadedShaders: [] |   m_PreloadedShaders: [] | ||||||
|   m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, |   m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, | ||||||
|     type: 0} |     type: 0} | ||||||
|  |  | ||||||
|  | @ -751,7 +751,7 @@ PlayerSettings: | ||||||
|   webGLWasmStreaming: 0 |   webGLWasmStreaming: 0 | ||||||
|   scriptingDefineSymbols: |   scriptingDefineSymbols: | ||||||
|     1: TextMeshPro |     1: TextMeshPro | ||||||
|     4: TextMeshPro;Notifications;IssuePerson |     4: TextMeshPro;Notifications;IssuePerson;JOYPAC_Volcano_OS | ||||||
|     7: ANDROID_CN;TextMeshPro;JOYPAC_ReYun;JOYPAC_Volcano |     7: ANDROID_CN;TextMeshPro;JOYPAC_ReYun;JOYPAC_Volcano | ||||||
|     13: TextMeshPro |     13: TextMeshPro | ||||||
|     14: TextMeshPro |     14: TextMeshPro | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue