AnotherDole / wrongest

The Wrongest Words
3 stars 0 forks source link

GA event on game end. #55

Closed AhoyLemon closed 9 years ago

AhoyLemon commented 9 years ago

The game should send an analytic event when a game ends with the notice that the game has ended. But it should only happen once. I think the cleanest way to figure that out is to only have the game leader send back the event.

Possible data to send at this point:

AnotherDole commented 9 years ago

Which of these to you want to track via GA and which do you need to track via the server?

Another thing I thought might be interesting to track is the number of games completed per room.

AhoyLemon commented 9 years ago

Unsure. I guess at this moment in time, I'm just thinking about grabbing whatever data seems possibly interesting. (since the game can report on basically everything, since everything is javascript, and that's something I've never experienced before so I'm excited about it)

I guess it's about what's easiest to implement and what's easiest to retrieve. GA events are pretty easy to make (basically just a single line of code with the variables that you want to send), but a little bit complicated to do anything with. Let me sketch out something in the end game function real quick, although I'm having a difficult time checking for if you're the leader or not, so I might need help there.

AnotherDole commented 9 years ago

You could just do if(meDealer){} in the gameover event to only send one per room.

AhoyLemon commented 9 years ago

Ooh, I didn't see that. Okay, let me try that.