The following sendData related section of the linked example...
var sendData = JSON.stringify({
"var1" : harlowe.State.variables['var1'],
"var2" : harlowe.State.variables['var2'],
"var3" : harlowe.State.variables['var3'],
"var4" : harlowe.State.variables['var4'],
"var5" : harlowe.State.variables['var5']
});
... is creating an generic object with a set of key / value pairs, which it then converts a JSON String.
eg. key "var1" in the object equals the current value return by the harlowe.State.variables['var1'] expression.
One reason the example is limited to the values of game's story variables is because Harlowe has been deliberately designed to restrict access to it's engines internal functionality & state via JavaScript, and this is why the linked example includes a Scope Escalation hack to allow you to gain access the engine's State.variables object.
The simplest way for you to gain access to the other data you want to pass to the Google spreadsheet is to store that data in a story variable just before you execute the JavaScript that'll send it to the server.
ex. If you want to track which Passages (excluding the current one) that the Player has visited (in the order that they were visited) while playing your game then you could assign the Array returned by the (history:) macro to a story variable just before executing the JavaScript functionality.
(set: $history to (history:))
... and modify the JavaScript that creates the sendData JSON String to include the new story variable like so...
var sendData = JSON.stringify({
"var1" : harlowe.State.variables['var1'],
"var2" : harlowe.State.variables['var2'],
"var3" : harlowe.State.variables['var3'],
"var4" : harlowe.State.variables['var4'],
"var5" : harlowe.State.variables['var5'],
"history" : harlowe.State.variables['history']
});
edit:
You can use methods on JavaScript Date instance to access the current time on the Player's machine, which you can store in the sendData JSON String like so.
var sendData = JSON.stringify({
"var1" : harlowe.State.variables['var1'],
"var2" : harlowe.State.variables['var2'],
"var3" : harlowe.State.variables['var3'],
"var4" : harlowe.State.variables['var4'],
"var5" : harlowe.State.variables['var5'],
"history" : harlowe.State.variables['history'],
"now" : Date.now()
});