com.amanotes.gdk 0.1.16 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -1
- package/Packages/AmaGDKConfig.unitypackage +0 -0
- package/Packages/AmaGDKExample.unitypackage +0 -0
- package/Packages/AppsFlyerAdapter_v6.5.4.unitypackage +0 -0
- package/Packages/FirebaseAnalyticsAdapter_v9.1.0.unitypackage +0 -0
- package/Runtime/AmaGDK.Analytics.cs +18 -18
- package/Runtime/AmaGDK.cs +1 -1
- package/package.json +1 -1
- /package/Packages/{AppsflyerAdapter_v6.5.4.unitypackage.meta → AppsFlyerAdapter_v6.5.4.unitypackage.meta} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.17 - 2023-03-13]
|
|
4
|
+
### Release AmaGDK v0.1.17
|
|
5
|
+
### Rename Analytics APIs
|
|
6
|
+
|
|
3
7
|
## [0.1.16 - 2023-03-10]
|
|
4
8
|
### Release AmaGDK v0.1.16
|
|
5
9
|
### SemVer supports 4 parts
|
|
6
|
-
### Analytics supports
|
|
10
|
+
### Analytics supports EventConfig
|
|
7
11
|
|
|
8
12
|
## [0.1.15 - 2023-03-06]
|
|
9
13
|
### Release AmaGDK v0.1.15
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -54,7 +54,7 @@ namespace Amanotes.Core
|
|
|
54
54
|
get { return !string.IsNullOrEmpty(funnelSignature); }
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
public bool
|
|
57
|
+
public bool IsAdapterForbidden(string adapterId)
|
|
58
58
|
{
|
|
59
59
|
if (ignoreAdapterIds.Count > 0)
|
|
60
60
|
{
|
|
@@ -70,12 +70,12 @@ namespace Amanotes.Core
|
|
|
70
70
|
return false;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
public bool
|
|
73
|
+
public bool IsSkippedBySendAtCountConfig()
|
|
74
74
|
{
|
|
75
|
-
if (!
|
|
75
|
+
if (!sendAtCount.TryGetValue(eventName, out var sendAtCountConfig)) return false;
|
|
76
76
|
|
|
77
|
-
int accumulatedCount = GetAccumulatedCount(eventName,
|
|
78
|
-
return !
|
|
77
|
+
int accumulatedCount = GetAccumulatedCount(eventName, sendAtCountConfig.withinSession);
|
|
78
|
+
return sendAtCountConfig.listCount == null ? false : !sendAtCountConfig.listCount.Contains(accumulatedCount);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -226,25 +226,25 @@ namespace Amanotes.Core
|
|
|
226
226
|
localData.UpdateMigrationLog();
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
public static void
|
|
229
|
+
public static void OnlyAllowEvents(List<string> eventNames, params string[] adapterIDs)
|
|
230
230
|
{
|
|
231
231
|
foreach (var adapterID in adapterIDs)
|
|
232
232
|
{
|
|
233
233
|
var adapter = listAdapters.Find(a => a.id == adapterID)?.GetAdapterApi<IAnalyticAdapter>();
|
|
234
|
-
adapter?.
|
|
234
|
+
adapter?.OnlyAllowEvents(eventNames);
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
public static void
|
|
238
|
+
public static void OnlyBanEvents(List<string> eventNames, params string[] adapterIDs)
|
|
239
239
|
{
|
|
240
240
|
foreach (var adapterID in adapterIDs)
|
|
241
241
|
{
|
|
242
242
|
var adapter = listAdapters.Find(a => a.id == adapterID)?.GetAdapterApi<IAnalyticAdapter>();
|
|
243
|
-
adapter?.
|
|
243
|
+
adapter?.OnlyBanEvents(eventNames);
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
-
public static void
|
|
247
|
+
public static void OnlySendAtCount(string eventName, List<int> listCount, bool withinSession = false, bool appendCountToEventName = false, string numberFormat = "00")
|
|
248
248
|
{
|
|
249
249
|
var config = new EventConfig
|
|
250
250
|
{
|
|
@@ -254,14 +254,14 @@ namespace Amanotes.Core
|
|
|
254
254
|
numberFormat = numberFormat
|
|
255
255
|
};
|
|
256
256
|
|
|
257
|
-
if (
|
|
257
|
+
if (sendAtCount.ContainsKey(eventName))
|
|
258
258
|
{
|
|
259
259
|
LogWarning($"{eventName} has already been set list of count number to log.");
|
|
260
|
-
|
|
260
|
+
sendAtCount[eventName] = config;
|
|
261
261
|
}
|
|
262
262
|
else
|
|
263
263
|
{
|
|
264
|
-
|
|
264
|
+
sendAtCount.Add(eventName, config);
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
}
|
|
@@ -277,7 +277,7 @@ namespace Amanotes.Core
|
|
|
277
277
|
public string numberFormat;
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
internal static readonly Dictionary<string, EventConfig>
|
|
280
|
+
internal static readonly Dictionary<string, EventConfig> sendAtCount = new Dictionary<string, EventConfig>();
|
|
281
281
|
internal static Predicate<EventDetail> logEventHook = null;
|
|
282
282
|
internal static readonly Queue<EventParams> eventQueue = new Queue<EventParams>();
|
|
283
283
|
internal static readonly List<AdapterInfo> listAdapters = new List<AdapterInfo>();
|
|
@@ -325,7 +325,7 @@ namespace Amanotes.Core
|
|
|
325
325
|
|
|
326
326
|
internal static string GetEventNameToSend(string eventName, int countInSession, int totalCount)
|
|
327
327
|
{
|
|
328
|
-
if (!
|
|
328
|
+
if (!sendAtCount.TryGetValue(eventName, out var config)) return eventName;
|
|
329
329
|
if (!config.appendCountToEventName) return eventName;
|
|
330
330
|
|
|
331
331
|
return $"{eventName}_{(config.withinSession ? countInSession : totalCount).ToString(config.numberFormat)}";
|
|
@@ -367,7 +367,7 @@ namespace Amanotes.Core
|
|
|
367
367
|
}
|
|
368
368
|
|
|
369
369
|
//Check predefined event count config
|
|
370
|
-
if (eventData.
|
|
370
|
+
if (eventData.IsSkippedBySendAtCountConfig())
|
|
371
371
|
{
|
|
372
372
|
return false;
|
|
373
373
|
}
|
|
@@ -657,8 +657,8 @@ namespace Amanotes.Core.Internal
|
|
|
657
657
|
|
|
658
658
|
void SetUserProperty(string key, string value);
|
|
659
659
|
|
|
660
|
-
void
|
|
660
|
+
void OnlyAllowEvents(List<string> eventNames);
|
|
661
661
|
|
|
662
|
-
void
|
|
662
|
+
void OnlyBanEvents(List<string> eventNames);
|
|
663
663
|
}
|
|
664
664
|
}
|
package/Runtime/AmaGDK.cs
CHANGED
package/package.json
CHANGED
|
File without changes
|