Metrics on clicks through story

Hi all, I am new with Twine2 and wondered if there is a way to measure how many times links are clicked and some sort of analytics to track behaviour of readers on the story? Thanks a lot for any comment of feedback

1 Like

Anything you make in Twine is just a web page, using HTML, CSS, and JavaScript like any other web page. So, yes, there are ways to track these things, but it’s dependent on how you set up your server to track that data.

As for specific code, besides knowing what kind of data your server expects, we’d also need to know what story format you’re working in, since you didn’t mention that in your post or the post’s tags.

But anyways, yeah, you can do just about anything in Twine that you can do on a regular web page, some of it just takes a bit more experience with programming to do.

Good luck! :grinning:


I plan to use the standard Harlowe format and the story will be fairly linear with multiple choices but that’s it. I am not familiar with coding and just wondered if there is an easy way with the Twine tool to know which options people click on?

Harlowe is too restrictive for me, so I don’t know much about it.

If you use SugarCube it’s pretty easy though, it has events that trigger on passage transitions which you could use to track choices.

Do you know what backend service you plan on using to view the choices? Or are you looking for one?

Thanks HiEV, I am a bit worried that SugarCube might be a bit much as I don’t have experience with coding but I will look into it.

Nope I don’t have any backend service in mind yet, do you have any suggestions?

SugarCube isn’t any harder to code with than Harlowe and, in fact, it makes it easier to do lots of more complex things.

I would have suggested Google Sheets as a possibility earlier, but apparently Google changed something earlier this year in Google Sheets which broke the code which had been working to receive data from Twine. I haven’t looked into it yet to see how to fix that.

Taking a look at this “Save Web Form Data to Spreadsheets” article, it suggests that you may have to go through a site like API Spreadsheets to access Google Sheets now.

You should be able to adapt the earlier Twine/SugarCube code I linked to above with the code from that article in order to use that to store your data using Google Sheets.

Hope that helps! :grinning:

Thanks, this is very helpful, I just hope I can pull that off! :sweat_smile: