Forum Discussion
KateRobertson
11 years agoCommunity Member
Exporting Variables into a Google Spreadsheet
Having read this post on how to export variables to be read in a google spreadsheet, I set about trying to get this working in my project, I soon ran into problems, I just could not get it to work a...
KateRobertson
11 years agoCommunity Member
Thank's Steve - I will try your javascript to automatically add the jquery line into my files.
Great example, thanks Erich!
Jacinta - you need to set up a spreadsheet where the columns are 'scorepercent' and 'name', follw the instructions above to add code to the google spreadsheet, then in the javascript you add to the articulate trigger you would put (just make sure the column titles and the variables are spelt exactly the same and in the same case):
var player = GetPlayer();
$.ajax({
url:
"Current web app URL",
type: "POST",
data: {"name": player.GetVar("name")
, "scorepercent": player.GetVar("scorepercent")},
success: function(data)
{
alert(data);
},
error: function(err) {
console.log(err);
}
});
return false;
Hope that helps!