How do I send a "levelStart" event to the html5 platform

0 favourites
  • 5 posts
From the Asset Store
Complete game Construct 2 and Construct 3 to post on Google Play
  • Hi,

    I've done a html5 game and the platform requires the game to send a "levelStart" and a "levelCompletion" event so that they can evaluate how many play session have been played.

    Any idea how I can do that?

    Thanks a lot!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It depends on the platform, so you should probably ask them instead.

  • I've had a reply from the platform owner:

    "In order to measure the “time played” inside a game, we need a constant exchange between users interaction and tracking information send to GA. If there is no “Level Start” event inside the games, we cannot tell how long he is playing the game. This is due to the technical nature of how tracking systems are working:

    Situation 1:

    Open the Game (information send to GA)

    Leave the website (no information send)

    Situation 2:

    Open the Game (information send to GA)

    Start Level Event (information send to GA)

    Leave the website (no information send)

    Tracking systems will measure the time between two interaction points. When there are no follow up interactions after opening the game, the tracking system cannot measure the time in between and will return 0:00 time played for the user in Situation 1. Integrating events inside the game will give the tracking systems more interaction points to calculate the time in between those. The same user from Situation 1 (return: 0:00) will now return a time played in Situation 2."

    Does it help? Not sure this gives enough information as they don't tell HOW it should be done. :-/

  • You really should take this up with them, it's their service. I don't think anybody here can help.

  • How are they implementing your game into their site? This is really something that should be done on their page... What are the name of their events? Are they using analytics.js, GTM or UA? Do they have a preferred schema for the event? (i.e are they using timing, app/screen or just some weird version of send?)

    At a guess, something like this?

    ga('send', 'event', 'levelStart', 'Level1' { 'nonInteraction': 1 })

    It depends how strict they want to be with their reporting.. personally I'd use nonInteraction... They must have a preferred snippet for this otherwise their anayltics would be a mess

    This feels like a really weird work around to get rid of page bounces, but surely they know that any custom event will negate a bounce? They could have a universal time based event that negated all of this...

    <script type="text/javascript">
    function timer10(){ga('send', 'event', 'TimeOnPage', '1', '10+ seconds', { 'nonInteraction': 1 });}

    Every session over 10 seconds would then be a tracked session

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