Construct 3 + GameAnalytics - Highly inflated event metrics

0 favourites
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • NOTE: I'm not sure if this is a Construct 3 issue or a issue with gameanalytics plugin, but I thought I'd see if anyone else has experienced this. Also, if the mods believe this belongs in the SDK forum, please do move it to its appropriate place.

    Today, I set up the GA SDK in Construct 3 on a project I've been working on. Said project is quite simple, with the user simply progressing through four different layouts - three of which have an "Add Progression Event Start:"MainGame01":"Screen0X":"" upon the start of the new layouts, and an "Add Progression Event Complete:"MainGame01":"Screen0X":"" at the completion of each layer. Each layout increases the Progression number Screen0X by one (e.g., Screen01, Screen02, etc).

    Though the SDK does communicate flawlessly with the GameAnalytics website, I have a particular problem with the third layout progression event (Screen02) reporting nearly 100 Completion events for each single run of the game. GA reports I've played the game 32 times, but Screen02 has 566 event completes, but only five starts. Both of the other layouts started reporting absurdly high completion numbers exceeding their start numbers as well.

    This is a simple educational matching game, and the completion is generated by a single button click, so Construct *should* be sending only one entry.

    I decided to create an entirely blank Construct 3 project to test this. It has three layouts, three click-through sprites, and the exact style of GameAnalytics progression events as my main project - functionally, its identical to my main project. I gave it its own keys within my account, created a new "Game" within the GA dashboard for the test, and played the game through twice.

    It reported correct metrics (two plays) for all events *except* Screen03 - of which it reports 5 events. It's impossible - I've played the game twice.

    Has anyone else encountered behavior like this from GA? I'm also running both projects with Workers disabled, as GA doesn't seem to run without it turned off (at least, as far as I can tell).

    -Kurt

  • without seeing your code, I would guess that some condition is true for multiple ticks which results in the results be sent multiple times.

  • My thoughts as well - except that I've tried tying the completion event multiple ways:

    1. 1. To a successful mouse click of a button. Really shouldn't be throwing multiple ticks because of that.
    2. 2. To an animated gear sprite that's toggled visible only upon completion of the layout. That shouldn't be throwing multiple ticks because of the animation either, and it stands alone.
    3. 3. On load of the next layout. After all, if it is tied to the # of ticks, one would expect the same number of Completion events for the previous layout as Start events for the next, given the condition they're under. But the Start events are never inflated. Only the Completion events.

    I can upload a .c3p of the test layout, though if anyone wants to test it with GA, they'll have to add their own keys.

    -Kurt

  • invisible sprites can still be clicked on.

    I would be happy to take a look at your test file.

  • I would be happy to take a look at your test file.

    Here it is:

    dropbox.com/s/u9ny8z94aly33ky/Progression-Test-No-Keys-GA-SDK.c3p

    -Kurt

  • well, you are correct - that is pretty simple and there are no obvious problems with the events.

    the sdk says there are two levels of debugging logs that get output to the console. you could try that...

  • Does this problem happen with the test project you posted? I agree with Allan, you are probably sending this event many times in your game. This can happen, for example, if you use "Is touching button" event instead of "On touched button".

    I've implemented GA in many games and never had this issue.

    You can try adding a counter (global variable), which increments every time you are sending the progression event, and display this counter in all layouts in your game. Also, check Realtime-> Live Feed in GA dashboard.

  • the sdk says there are two levels of debugging logs that get output to the console. you could try that...

    I'll look into the debugging logs. Couldn't find them initially, but I wasn't looking that hard.

    Does this problem happen with the test project you posted? I agree with Allan, you are probably sending this event many times in your game. This can happen, for example, if you use "Is touching button" event instead of "On touched button".

    I've implemented GA in many games and never had this issue.

    You can try adding a counter (global variable), which increments every time you are sending the progression event, and display this counter in all layouts in your game. Also, check Realtime-> Live Feed in GA dashboard.

    It happens with the test project, but to a lesser extent. The game has been played 2 times, but Screen03 reports five completions:

    The only touch command used was when I tried tying GA to one of the button "on click" events - which should be sending the event only once. The problem seemed to get worse when I moved it to a "SpinnyGear: Visible" event (SpinnyGear is a sprite that is toggled visible and left to run for 1 second before the layout progresses).

    Given that this is showing up in the test as well, I'll try the global variable on it; see what happens.

    I've checked the live feed. With 10 events shown on it at any time, all I get to see is rampant duplication of said events.

    FYI - I don't know if this is directly relevant or not, but I can't get GA to operate with worker mode enabled.

  • Well, there are only two possibilities - either your "On click" event is triggered several times, or there is a bug in the plugin which sends the progression event several times. Like I said, this never happened to me, so I suspect that the problem is with your code.

    Are you testing your game on mobile?

    GA plugin doesn't work with worker mode, and I don't think it's related to this issue.

  • Well, there are only two possibilities - either your "On click" event is triggered several times, or there is a bug in the plugin which sends the progression event several times. Like I said, this never happened to me, so I suspect that the problem is with your code.

    Are you testing your game on mobile?

    GA plugin doesn't work with worker mode, and I don't think it's related to this issue.

    I'll assume worker mode is unrelated then.

    I'm testing on desktop. All click events. No touch events ATM.

    That said, I've redesigned the event sheets on the test project with a global variable to run the progression events - along with a visible counter. Text output looks fine for each of the three layouts.

    Here's the c3p (keys removed) for anyone who wants to verify the work:

    dropbox.com/s/fy2kgifxlv8ubha/v2-Progression-Test-No-Keys-GA-SDK.c3p

    And despite all of this...there's still something wrong with the metrics. The two starts make sense; I opened it once without playing. The two endings do not make sense.

    -Kurt

  • Holy crap. That escalated quickly.

    -Kurt

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I give up, this doesn't make sense..

    If you are testing in desktop browser, press F12 and see if there are any GA messages or errors in the console log. You can also add "Browser Log" actions to your code to see when these events are triggered.

  • I give up, this doesn't make sense..

    If you are testing in desktop browser, press F12 and see if there are any GA messages or errors in the console log. You can also add "Browser Log" actions to your code to see when these events are triggered.

    I still need to look at the GA error log, but the Google Chrome inspector speaks for itself (!)

    EDIT: Apparently, the GA error log shows up IN the inspector - I'm an idiot.

    Those events increase in number by about 100 every second. It is like the command is running every tick, but it's also running 100 events per tick. I'd venture to say the command is running in some sort of infinite loop.

    I also tried adding a session start/session end condition before the progression events. All it did was change the way the sessions were logged, but a gazillion of them still popped up:

    -Kurt

  • Looks like GA plugin is resending the same event, probably because it doesn't receive response from the server. I suggest you report it to GA support.

  • stage=1 is true and stay true every tick, so it keeps sending it every tick.

    Add a "trigger once" ccondition.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)