Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Possible to tally/record/analytics people's actions through the dialogue?

I'm trying to get an average or most common path, to recreate it for a live audience. I tried looking at the html that harlowe or sugarcube pushes out and I'm sort of at a loss. I do have JS experience though and understand the basics of analytics, but I wonder if you guys have any better idea on how to do this?

Thanks!

Comments

  • I should add, I've set up a Node server with Meteor and I'm planning on hosting the dialogue system on locally accessible server, so I can use Meteor/Node packages if you know of any.
  • note: The TheMadExile would be the best person to answer this from a SugarCube 1.x and 2.x point of view.

    It is not clear from your question if you only want to track which Passages the Reader visited or if you want to track which links they clicked on. There can be a difference between the two because a link does not have to result in a passage traversal.

    If all you want to do is know which passages were visited then this can be achieved by either looking at the collection returned by Harlowe's (history: ) macro, (I believe) in SugarCube 1's case by using the length and index properties of the History API, and (I believe) in SugarCube 2's case the length and index properties of the State API.

    If you want to track which links the Reader clicked on then you will need to use your own collection variable to do that, either within your passage code or within some Javascript monitoring the click events of the links.
  • As greyelf notes, it depends on the exact details you wish to track.

    Assuming you just want the followed path data or something to that effect, then the following should work in any story format, though the implementation details will vary:
    • If you wanted to track the passages traversed at the end of a complete playthrough, then you could relay the full play path to your analytics server by having the final passage check the story history.
    • If you wanted to track the passages traversed whether the playthrough was complete or not, then you could relay which passage was played to your analytics server at render time—pre- or post-display.
    • If you wanted to track each link clicked, then you could relay which link was clicked to your analytics server by using a link macro, or the equivalent.
    If you're looking for something more complicated, then that's probably quite a bit trickier.

    Regardless, and again, it depends on the exact details you wish to track.
  • Interesting! So I think I will try to track the passage traversed, and at the end, pass a path... array to my server. I think that makes sense.

    Thank you for your answer! I'll try to post my code for others when I'm finished.
Sign In or Register to comment.