Defold Integration for GameAnalytics (DEF-3024)

Ah, sorry. I misread the date :frowning: (middle of the night here)
I will take a look at this first thing in the morning!

EDIT: For future readers: The server misbehaved, and is now restarted. Please give it a try.

3 Likes

Building for Windows seems to work fine on my machine. Is it still not working for you @Pkeod?

It’s working again now. Seems to have only been a temporary problem with the build server .

1 Like

@mts I made a pull request to fix GDPR compliance.

7 Likes

Thanks @Pkeod. Sorry for the late reply. I have been on holiday the whole of last week but I have merged your PR and made a new release version as well.

5 Likes

Could you check the Linux build? I am having errors when building Linux version on Linux Mint (not sure that matters). I tested building the example https://github.com/GameAnalytics/GA-SDK-DEFOLD

errors.zip (24.1 KB)

Update: I tested building on a Linux target on Windows machine and building/bundling worked? :thinking:

1 Like

I see empty lines here: https://gameanalytics.com/docs/item/defold-sdk#setup-for-html5

@gameanalytics so, are there any specific steps for HTML5?

UPD: and yes, it does not work just as is and breaks my HTML5 build on load attempt now:

exception thrown: ReferenceError: Can’t find variable: gameanalytics,eval code

UPD2: ok, I supposed maybe there simply should be GameAnalytics.js tagged somewhere and this seemed to make it work:

<script type='text/javascript' src="GameAnalytics.js"></script>

UPD3: it seems to be registering sessions from HTML5, but does not track Progression events and Design events. when the same code works both for OSX and iOS builds. In the web tools I see how network request with event is sent, but I don’t see events in the dashboard:

sent events

[
{
“v”: 2,
“user_id”: “ddf5f728-95a0-49ef-4862-c23df5ef2a32”,
“client_ts”: 1551012271,
“sdk_version”: “defold 2.1.1”,
“os_version”: “mac_osx 10.14.1”,
“manufacturer”: “unknown”,
“device”: “unknown”,
“browser_version”: “safari 12”,
“platform”: “mac_osx”,
“session_id”: “8ae3b485-d1b0-47d1-cbc1-22a04188dc6b”,
“session_num”: 4,
“connection_type”: “lan”,
“engine_version”: “defold 1.2.147”,
“build”: “1.1.9”,
“category”: “progression”,
“event_id”: “Complete:level_43”,
“attempt_num”: 1
},
{
“v”: 2,
“user_id”: “ddf5f728-95a0-49ef-4862-c23df5ef2a32”,
“client_ts”: 1551012271,
“sdk_version”: “defold 2.1.1”,
“os_version”: “mac_osx 10.14.1”,
“manufacturer”: “unknown”,
“device”: “unknown”,
“browser_version”: “safari 12”,
“platform”: “mac_osx”,
“session_id”: “8ae3b485-d1b0-47d1-cbc1-22a04188dc6b”,
“session_num”: 4,
“connection_type”: “lan”,
“engine_version”: “defold 1.2.147”,
“build”: “1.1.9”,
“category”: “design”,
“event_id”: “LevelAchieved:41”
},
{
“v”: 2,
“user_id”: “ddf5f728-95a0-49ef-4862-c23df5ef2a32”,
“client_ts”: 1551012271,
“sdk_version”: “defold 2.1.1”,
“os_version”: “mac_osx 10.14.1”,
“manufacturer”: “unknown”,
“device”: “unknown”,
“browser_version”: “safari 12”,
“platform”: “mac_osx”,
“session_id”: “8ae3b485-d1b0-47d1-cbc1-22a04188dc6b”,
“session_num”: 4,
“connection_type”: “lan”,
“engine_version”: “defold 1.2.147”,
“build”: “1.1.9”,
“category”: “design”,
“event_id”: “Level:level_43:Finished:user_level”,
“value”: 41
},
{
“v”: 2,
“user_id”: “ddf5f728-95a0-49ef-4862-c23df5ef2a32”,
“client_ts”: 1551012271,
“sdk_version”: “defold 2.1.1”,
“os_version”: “mac_osx 10.14.1”,
“manufacturer”: “unknown”,
“device”: “unknown”,
“browser_version”: “safari 12”,
“platform”: “mac_osx”,
“session_id”: “8ae3b485-d1b0-47d1-cbc1-22a04188dc6b”,
“session_num”: 4,
“connection_type”: “lan”,
“engine_version”: “defold 1.2.147”,
“build”: “1.1.9”,
“category”: “design”,
“event_id”: “Level:level_43:Finished:completion_time”,
“value”: 725.2
},
{
“v”: 2,
“user_id”: “ddf5f728-95a0-49ef-4862-c23df5ef2a32”,
“client_ts”: 1551012271,
“sdk_version”: “defold 2.1.1”,
“os_version”: “mac_osx 10.14.1”,
“manufacturer”: “unknown”,
“device”: “unknown”,
“browser_version”: “safari 12”,
“platform”: “mac_osx”,
“session_id”: “8ae3b485-d1b0-47d1-cbc1-22a04188dc6b”,
“session_num”: 4,
“connection_type”: “lan”,
“engine_version”: “defold 1.2.147”,
“build”: “1.1.9”,
“category”: “design”,
“event_id”: “Level:level_43:Finished:taps_count”,
“value”: 9
},
{
“v”: 2,
“user_id”: “ddf5f728-95a0-49ef-4862-c23df5ef2a32”,
“client_ts”: 1551012271,
“sdk_version”: “defold 2.1.1”,
“os_version”: “mac_osx 10.14.1”,
“manufacturer”: “unknown”,
“device”: “unknown”,
“browser_version”: “safari 12”,
“platform”: “mac_osx”,
“session_id”: “8ae3b485-d1b0-47d1-cbc1-22a04188dc6b”,
“session_num”: 4,
“connection_type”: “lan”,
“engine_version”: “defold 1.2.147”,
“build”: “1.1.9”,
“category”: “design”,
“event_id”: “Level:level_43:Finished:level_tries”,
“value”: 1
},
{
“v”: 2,
“user_id”: “ddf5f728-95a0-49ef-4862-c23df5ef2a32”,
“client_ts”: 1551012273,
“sdk_version”: “defold 2.1.1”,
“os_version”: “mac_osx 10.14.1”,
“manufacturer”: “unknown”,
“device”: “unknown”,
“browser_version”: “safari 12”,
“platform”: “mac_osx”,
“session_id”: “8ae3b485-d1b0-47d1-cbc1-22a04188dc6b”,
“session_num”: 4,
“connection_type”: “lan”,
“engine_version”: “defold 1.2.147”,
“build”: “1.1.9”,
“category”: “progression”,
“event_id”: “Start:level_26”
},
{
“v”: 2,
“user_id”: “ddf5f728-95a0-49ef-4862-c23df5ef2a32”,
“client_ts”: 1551012273,
“sdk_version”: “defold 2.1.1”,
“os_version”: “mac_osx 10.14.1”,
“manufacturer”: “unknown”,
“device”: “unknown”,
“browser_version”: “safari 12”,
“platform”: “mac_osx”,
“session_id”: “8ae3b485-d1b0-47d1-cbc1-22a04188dc6b”,
“session_num”: 4,
“connection_type”: “lan”,
“engine_version”: “defold 1.2.147”,
“build”: “1.1.9”,
“category”: “design”,
“event_id”: “Level:level_26:Started:user_level”,
“value”: 42
}
]

UPD4: Ok, I can see the amount of Progression and Design events, but can’t filter by exact subcategories. Maybe it just needs some time to be processed properly…

UPD5: After about 24 hours subcategories are also here. So everything seems working, but anyway documentation regarding HTML5 needs to be fixed

And I can see events from HTML5 build now, and game looks working correctly, but there is still some error in the web console:

does it some how related to GameAnalytics?

@Pkeod @marat.giliazov i will look into both issues now

2 Likes

Regarding getParameter, it should only be a warning (due to us querying for some WebGL features inside the engine), more info here: Facebook instant error (SOLVED)

2 Likes

Yeah adding <script type=‘text/javascript’ src=“GameAnalytics.js”></script> should solve the problem. I have also updated the docs page with the missing information (I think the information was during a transition to the documentation page for all our SDKs)

3 Likes

I don’t think this has anything to do with the GA SDK

2 Likes

I have also opened for issues on the github repo https://github.com/GameAnalytics/GA-SDK-DEFOLD/issues for specific issues/bugs related to the GA SDK for Defold

3 Likes

Thanks! There was also a pair of minor typos I’ve noticed on the docs page, but I did not find a proper way to point on them, so will just put them here:

“set a custom dimensionvalue” -> space missed
“TThe SDK will” -> double T

2 Likes

Log in, and you can report issues, by clicking the button in the bottom right corner :slight_smile:

2 Likes

Thanks for reporting this. I have corrected typos now on the docs page.

2 Likes

This should be fixed now in the latest version (v2.1.2)

2 Likes

Awesome! Will test soon.

1 Like

Hi there, I saw there was an update to version 2.2.1 and it seems breaking my HTML5 builds. On try to run web-build I see in browser’s console errors inside ProjectName_asm.js and _wasm.js (depends on what is used, checked both). And the issue disappears after reverting to 2.2.0.

Does anyone else faces the same issue? I was using only Design events, nothing more.

Check please

UPD: raised the issue for this - https://github.com/GameAnalytics/GA-SDK-DEFOLD/issues/14

2 Likes

Should be already fixed in 2.2.2 :slightly_smiling_face:

2 Likes