Hi Mo,
I’m not positive but I believe the parameters need to be in the form of a table. The way you have it might not work at all, or if it did you would only be recording a single parameter for that event. But what if, say, you also wanted to know how long it took someone to complete a level? You’d have to create a new event with another single parameter. A better way might be:
analytics.logEvent("levelPlayed", {levelNumber = gameLevel})
where gameLevel is the variable name of the particular level you want to record. Then you could add and record as many other parameters as you wanted under the “levelPlayed” event. After the level is completed you could record the time played as another parameter:
analytics.logEvent("levelPlayed", {playTime = playTime})
where playTime is both the name of Flurry parameter as well as the internal Corona variable for the length of time the player took to complete the level.
Since it’s a table you can even string them all together in a single logEvent when the level is complete:
analytics.logEvent("levelPlayed", {levelNumber = gameLevel, playTime = playTime, score = levelScore, vehicle = "Jeep"})
In the Flurry dashboard you would then have a single event called levelPlayed. Clicking on that would get you to a dropdown menu of all your parameters for that one event. You could select gameLevel and see a piechart or bar graph showing you the frequency of play for each level. You could select another parameter and see how all the scores break down.
Why would you want to do it this way instead of having each parameter as its own event? Flurry actually has a limit of 300 events you can have for a single app. That seems like a lot but once you see the power of recording events you could easily run out. If your game has 100 levels and you want to record 3 event types per level then you’ll hit the limit. There’s no limit to the number of parameters you can record for an event, so doing it the way I show you could record dozens of parameters each time a level is played.
If you know you’re only going to have, say, 50 levels ever (and never will expand your game beyond that) then maybe it makes more sense to structure the events by level name and then put all the other parameters inside the level event:
analytics.logEvent("level 12", {playTime = playTime, score = levelScore, vehicle = "Jeep"})
Kind of up to you and your app how you want to structure the events so they are convenient to search through on the Flurry dashboard.
I should mention, I’ve only ever used Flurry analytics. I don’t know how things work on Amplitude or Corona’s analytics, what their limitations are, or how parameters are displayed on their dashboards. But I assume they all share the same Corona SDK syntax to log an event.
-Stephen