Skip to content

Commit

Permalink
Updated to v7.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dorin-ga committed Jul 23, 2024
1 parent 8a6afbe commit 665da33
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 42 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
---------
<!--(CHANGELOG_TOP)-->
**7.10.0**
* added checks to safely upgrade from 7.6.0 , 7.6.1, 7.7.0 without having any impact on metrics for Android

* fixed impression callback json for Digital Turbine
* removed deprecated functions from webgl
* fixed warnings for android

**7.10.0-beta**
* added checks to safely upgrade from 7.6.0 , 7.6.1, 7.7.0 without having any impact on metrics for Android
* fixed impression callback json for Digital Turbine
Expand Down
Binary file modified Runtime/Android/gameanalytics.aar
Binary file not shown.
2 changes: 1 addition & 1 deletion Runtime/Scripts/Setup/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public struct HelpInfo
/// The version of the GA Unity Wrapper plugin
/// </summary>
[HideInInspector]
public static string VERSION = "7.10.0-beta";
public static string VERSION = "7.10.0";

[HideInInspector]
public static bool CheckingForUpdates = false;
Expand Down
9 changes: 9 additions & 0 deletions Runtime/Scripts/Wrapper/GA_WebGLWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ public partial class GA_Wrapper
[DllImport ("__Internal")]
private static extern void addErrorEvent(int severity, string message, string fields, bool mergeFields);

[DllImport("__Internal")]
private static extern void addAdEventWithDuration(int adAction, int adType, string adSdkName, string adPlacement, long duration, string fields, bool mergeFields);

[DllImport("__Internal")]
private static extern void addAdEventWithReason(int adAction, int adType, string adSdkName, string adPlacement, int noAdReason, string fields, bool mergeFields);

[DllImport("__Internal")]
private static extern void addAdEvent(int adAction, int adType, string adSdkName, string adPlacement, string fields, bool mergeFields);

[DllImport ("__Internal")]
private static extern void setEnabledInfoLog(bool enabled);

Expand Down
6 changes: 3 additions & 3 deletions Runtime/Scripts/Wrapper/GA_Wrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ public static void AddAdEventWithDuration(GAAdAction adAction, GAAdType adType,
{
addAdEventWithDuration((int)adAction, (int)adType, adSdkName, adPlacement, duration, fieldsAsString, mergeFields);
}
#elif UNITY_IOS || UNITY_ANDROID
#elif UNITY_IOS || UNITY_ANDROID || UNITY_WEBGL
addAdEventWithDuration((int)adAction, (int)adType, adSdkName, adPlacement, duration, fieldsAsString, mergeFields);
#endif
}
Expand All @@ -605,7 +605,7 @@ public static void AddAdEventWithReason(GAAdAction adAction, GAAdType adType, st
{
addAdEventWithReason((int)adAction, (int)adType, adSdkName, adPlacement, (int)noAdReason, fieldsAsString, mergeFields);
}
#elif UNITY_IOS || UNITY_ANDROID
#elif UNITY_IOS || UNITY_ANDROID || UNITY_WEBGL
addAdEventWithReason((int)adAction, (int)adType, adSdkName, adPlacement, (int)noAdReason, fieldsAsString, mergeFields);
#endif
}
Expand All @@ -618,7 +618,7 @@ public static void AddAdEvent(GAAdAction adAction, GAAdType adType, string adSdk
{
addAdEvent((int)adAction, (int)adType, adSdkName, adPlacement, fieldsAsString, mergeFields);
}
#elif UNITY_IOS || UNITY_ANDROID
#elif UNITY_IOS || UNITY_ANDROID || UNITY_WEBGL
addAdEvent((int)adAction, (int)adType, adSdkName, adPlacement, fieldsAsString, mergeFields);
#endif
}
Expand Down
83 changes: 47 additions & 36 deletions Runtime/WebGL/GameAnalyticsUnity.jslib
Original file line number Diff line number Diff line change
Expand Up @@ -7,102 +7,117 @@ var GameAnalyticsUnity = {
},
configureAvailableCustomDimensions01: function(list)
{
gameanalytics.GameAnalytics.configureAvailableCustomDimensions01(JSON.parse(Pointer_stringify(list)));
gameanalytics.GameAnalytics.configureAvailableCustomDimensions01(JSON.parse(UTF8ToString(list)));
},
configureAvailableCustomDimensions02: function(list)
{
gameanalytics.GameAnalytics.configureAvailableCustomDimensions02(JSON.parse(Pointer_stringify(list)));
gameanalytics.GameAnalytics.configureAvailableCustomDimensions02(JSON.parse(UTF8ToString(list)));
},
configureAvailableCustomDimensions03: function(list)
{
gameanalytics.GameAnalytics.configureAvailableCustomDimensions03(JSON.parse(Pointer_stringify(list)));
gameanalytics.GameAnalytics.configureAvailableCustomDimensions03(JSON.parse(UTF8ToString(list)));
},
configureAvailableResourceCurrencies: function(list)
{
gameanalytics.GameAnalytics.configureAvailableResourceCurrencies(JSON.parse(Pointer_stringify(list)));
gameanalytics.GameAnalytics.configureAvailableResourceCurrencies(JSON.parse(UTF8ToString(list)));
},
configureAvailableResourceItemTypes: function(list)
{
gameanalytics.GameAnalytics.configureAvailableResourceItemTypes(JSON.parse(Pointer_stringify(list)));
gameanalytics.GameAnalytics.configureAvailableResourceItemTypes(JSON.parse(UTF8ToString(list)));
},
configureSdkGameEngineVersion: function(unitySdkVersion)
{
gameanalytics.GameAnalytics.configureSdkGameEngineVersion(Pointer_stringify(unitySdkVersion));
gameanalytics.GameAnalytics.configureSdkGameEngineVersion(UTF8ToString(unitySdkVersion));
},
configureGameEngineVersion: function(unityEngineVersion)
{
gameanalytics.GameAnalytics.configureGameEngineVersion(Pointer_stringify(unityEngineVersion));
gameanalytics.GameAnalytics.configureGameEngineVersion(UTF8ToString(unityEngineVersion));
},
configureBuild: function(build)
{
gameanalytics.GameAnalytics.configureBuild(Pointer_stringify(build));
gameanalytics.GameAnalytics.configureBuild(UTF8ToString(build));
},
configureUserId: function(userId)
{
gameanalytics.GameAnalytics.configureUserId(Pointer_stringify(userId));
gameanalytics.GameAnalytics.configureUserId(UTF8ToString(userId));
},
initialize: function(gamekey, gamesecret)
{
gameanalytics.GameAnalytics.addRemoteConfigsListener(listener);
gameanalytics.GameAnalytics.initialize(Pointer_stringify(gamekey), Pointer_stringify(gamesecret));
gameanalytics.GameAnalytics.initialize(UTF8ToString(gamekey), UTF8ToString(gamesecret));
},
setCustomDimension01: function(customDimension)
{
gameanalytics.GameAnalytics.setCustomDimension01(Pointer_stringify(customDimension));
gameanalytics.GameAnalytics.setCustomDimension01(UTF8ToString(customDimension));
},
setCustomDimension02: function(customDimension)
{
gameanalytics.GameAnalytics.setCustomDimension02(Pointer_stringify(customDimension));
gameanalytics.GameAnalytics.setCustomDimension02(UTF8ToString(customDimension));
},
setCustomDimension03: function(customDimension)
{
gameanalytics.GameAnalytics.setCustomDimension03(Pointer_stringify(customDimension));
gameanalytics.GameAnalytics.setCustomDimension03(UTF8ToString(customDimension));
},
setGlobalCustomEventFields: function(customFields)
{
gameanalytics.GameAnalytics.setGlobalCustomEventFields(JSON.parse(customFields));
},
addBusinessEvent: function(currency, amount, itemType, itemId, cartType, fields, mergeFields)
{
var fieldsString = Pointer_stringify(fields);
var fieldsString = UTF8ToString(fields);
fieldsString = fieldsString ? fieldsString : "{}";
gameanalytics.GameAnalytics.addBusinessEvent(Pointer_stringify(currency), amount, Pointer_stringify(itemType), Pointer_stringify(itemId), Pointer_stringify(cartType), JSON.parse(fieldsString), mergeFields);
gameanalytics.GameAnalytics.addBusinessEvent(UTF8ToString(currency), amount, UTF8ToString(itemType), UTF8ToString(itemId), UTF8ToString(cartType), JSON.parse(fieldsString), mergeFields);
},
addResourceEvent: function(flowType, currency, amount, itemType, itemId, fields, mergeFields)
{
var fieldsString = Pointer_stringify(fields);
var fieldsString = UTF8ToString(fields);
fieldsString = fieldsString ? fieldsString : "{}";
gameanalytics.GameAnalytics.addResourceEvent(flowType, Pointer_stringify(currency), amount, Pointer_stringify(itemType), Pointer_stringify(itemId), JSON.parse(fieldsString), mergeFields);
gameanalytics.GameAnalytics.addResourceEvent(flowType, UTF8ToString(currency), amount, UTF8ToString(itemType), UTF8ToString(itemId), JSON.parse(fieldsString), mergeFields);
},
addProgressionEvent: function(progressionStatus, progression01, progression02, progression03, fields, mergeFields)
{
var fieldsString = Pointer_stringify(fields);
var fieldsString = UTF8ToString(fields);
fieldsString = fieldsString ? fieldsString : "{}";
gameanalytics.GameAnalytics.addProgressionEvent(progressionStatus, Pointer_stringify(progression01), Pointer_stringify(progression02), Pointer_stringify(progression03), JSON.parse(fieldsString), mergeFields);
gameanalytics.GameAnalytics.addProgressionEvent(progressionStatus, UTF8ToString(progression01), UTF8ToString(progression02), UTF8ToString(progression03), JSON.parse(fieldsString), mergeFields);
},
addProgressionEventWithScore: function(progressionStatus, progression01, progression02, progression03, score, fields, mergeFields)
{
var fieldsString = Pointer_stringify(fields);
var fieldsString = UTF8ToString(fields);
fieldsString = fieldsString ? fieldsString : "{}";
gameanalytics.GameAnalytics.addProgressionEvent(progressionStatus, Pointer_stringify(progression01), Pointer_stringify(progression02), Pointer_stringify(progression03), score, JSON.parse(fieldsString), mergeFields);
gameanalytics.GameAnalytics.addProgressionEvent(progressionStatus, UTF8ToString(progression01), UTF8ToString(progression02), UTF8ToString(progression03), score, JSON.parse(fieldsString), mergeFields);
},
addDesignEvent: function(eventId, fields, mergeFields)
{
var fieldsString = Pointer_stringify(fields);
var fieldsString = UTF8ToString(fields);
fieldsString = fieldsString ? fieldsString : "{}";
gameanalytics.GameAnalytics.addDesignEvent(Pointer_stringify(eventId), JSON.parse(fieldsString), mergeFields);
gameanalytics.GameAnalytics.addDesignEvent(UTF8ToString(eventId), JSON.parse(fieldsString), mergeFields);
},
addDesignEventWithValue: function(eventId, value, fields, mergeFields)
{
var fieldsString = Pointer_stringify(fields);
var fieldsString = UTF8ToString(fields);
fieldsString = fieldsString ? fieldsString : "{}";
gameanalytics.GameAnalytics.addDesignEvent(Pointer_stringify(eventId), value, JSON.parse(fieldsString), mergeFields);
gameanalytics.GameAnalytics.addDesignEvent(UTF8ToString(eventId), value, JSON.parse(fieldsString), mergeFields);
},
addErrorEvent: function(severity, message, fields, mergeFields)
{
var fieldsString = Pointer_stringify(fields);
var fieldsString = UTF8ToString(fields);
fieldsString = fieldsString ? fieldsString : "{}";
gameanalytics.GameAnalytics.addErrorEvent(severity, Pointer_stringify(message), JSON.parse(fieldsString), mergeFields);
gameanalytics.GameAnalytics.addErrorEvent(severity, UTF8ToString(message), JSON.parse(fieldsString), mergeFields);
},
addAdEventWithDuration: function (adAction, adType, adSdkName, adPlacement, duration, fields, mergeFields) {
var fieldsString = UTF8ToString(fields);
fieldsString = fieldsString ? fieldsString : "{}";
gameanalytics.GameAnalytics.addAdEventWithDuration(adAction, adType, UTF8ToString(adSdkName), UTF8ToString(adPlacement), duration, JSON.parse(fieldsString), mergeFields);
},
addAdEventWithReason: function (adAction, adType, adSdkName, adPlacement, noAdReason, fields, mergeFields) {
var fieldsString = UTF8ToString(fields);
fieldsString = fieldsString ? fieldsString : "{}";
gameanalytics.GameAnalytics.addAdEventWithNoAdReason(adAction, adType, UTF8ToString(adSdkName), UTF8ToString(adPlacement), noAdReason, JSON.parse(fieldsString), mergeFields);
},
addAdEvent: function (adAction, adType, adSdkName, adPlacement, fields, mergeFields) {
var fieldsString = UTF8ToString(fields);
fieldsString = fieldsString ? fieldsString : "{}";
gameanalytics.GameAnalytics.addAdEvent(adAction, adType, UTF8ToString(adSdkName), UTF8ToString(adPlacement), JSON.parse(fieldsString), mergeFields);
},
setEnabledInfoLog: function(enabled)
{
Expand Down Expand Up @@ -130,9 +145,8 @@ var GameAnalyticsUnity = {
},
getRemoteConfigsValueAsString: function(key, defaultValue)
{
var returnStr = gameanalytics.GameAnalytics.getRemoteConfigsValueAsString(Pointer_stringify(key), Pointer_stringify(defaultValue));
var buffer = _malloc(lengthBytesUTF8(returnStr) + 1);
writeStringToMemory(returnStr, buffer);
var returnStr = gameanalytics.GameAnalytics.getRemoteConfigsValueAsString(UTF8ToString(key), UTF8ToString(defaultValue));
var buffer = stringToUTF8(returnStr);
return buffer;
},
isRemoteConfigsReady: function()
Expand All @@ -142,22 +156,19 @@ var GameAnalyticsUnity = {
getRemoteConfigsContentAsString: function()
{
var returnStr = gameanalytics.GameAnalytics.getRemoteConfigsContentAsString();
var buffer = _malloc(lengthBytesUTF8(returnStr) + 1);
writeStringToMemory(returnStr, buffer);
var buffer = stringToUTF8(returnStr);
return buffer;
},
getABTestingId: function()
{
var returnStr = gameanalytics.GameAnalytics.getABTestingId();
var buffer = _malloc(lengthBytesUTF8(returnStr) + 1);
writeStringToMemory(returnStr, buffer);
var buffer = stringToUTF8(returnStr);
return buffer;
},
getABTestingVariantId: function()
{
var returnStr = gameanalytics.GameAnalytics.getABTestingVariantId();
var buffer = _malloc(lengthBytesUTF8(returnStr) + 1);
writeStringToMemory(returnStr, buffer);
var buffer = stringToUTF8(returnStr);
return buffer;
}
};
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"name": "com.gameanalytics.sdk",
"version": "7.10.0-beta",
"version": "7.10.0",
"displayName": "GameAnalytics",
"description": "GameAnalytics collects and stores your data with no limits. You can then view your core KPI's in order to see what areas of your game need to improvements. If you want to find out more about how gamers play, then add in funnels, progression events and resource tracking. ",
"unity": "2018.1",
"private": true,
"dependencies": {
"com.google.external-dependency-manager": "1.2.168"
},
Expand Down

0 comments on commit 665da33

Please sign in to comment.