Forum Discussion
How to Create a FREE Leaderboard for eLearning with Google
This is the intro. Read the full article, watch the videos, and download the sample files from here: http://elearningbrothers.com/how-to-create-a-leaderboard-elearning-google/
Play with a live Storyline example here and see how you rank! http://elbrotherscustom.com/jk/blogs/leaderboard/story.html
“Gamification.” We recognize the benefits (even through all the hype) and we would like to add it to our courses. But where to begin? It is not enough just to add a game to your course. We need a way to make it social. After all, bragging rights go a long way towards reinforcing learning.
I think one of the easiest ways to tip your toe into eLearning gamification is to add a Leaderboard to your course. Leaderboards remind learners that they are not alone, others are completing the same training. They also create some friendly competition and let learners see how they rank among their peers. And often, if they rank low, they will go back and try again on all their own.
But how to add a Leaderboard? And how to do it for free? Google Sheets and a little code provide the solution. I know a lot of you use Google Docs every day. You may not realize that Google allows users to develop add-ons and applications on top of Docs using Google Apps Script (GAS). GAS looks a lot like JavaScript and it hooks into Google Docs to enable you to create all sorts of new tools. I have used it in the past to create printable certificates, detailed course interaction reports, and even a sort of scaled down LMS.
I decided to use Google Sheets and GAS to create a sort of database and API for a Leaderboard. With GAS I was able to turn a spreadsheet into a web application that will receive data from a course and send back a list of the top ten users. I added some JavaScript to my course to handle the sending and receiving from that end. I packaged it all up for you and wrote some directions, which you’ll find below. This week I am adding a Leaderboard to Storyline 2. If you are familiar with JavaScript and feel adventurous you can adapt this to work for Captivate, Lectora, HTML5, etc. And soon I will post code and videos for those tools as well.
The files linked in the resources section of this post have the GAS code and JavaScript in them. Using the instructions below (and watching the videos) you will be able to learn how to create a leaderboard for eLearning with Google:
- Create a Google Sheet
- Add GAS to the Sheet
- Setup the Sheet
- Deploy the Sheet as a Web App
- Add the required variables to your Storyline 2 course
- Trigger the JavaScript to send and receive the data
- Display the Leaderboard to learners
Read the full article, watch the videos, and download the sample files from here: http://elearningbrothers.com/how-to-create-a-leaderboard-elearning-google/
- onEnterFrameCommunity Member
It would be pretty hard to use an .xlsx on a web server. You would need server side code to open and edit the file :-/ If you were to go that far then you might as well use a database.
My current top favorites for "free" simple Database as a Service (DaaS) are FireBase and Airtable.
Airtable is really cool in that you can easily create customized "views" that you can embed right into your course. The downside is that the free level has their branding on it.
Another tool with a TON of promise is Glide. It lets you create mobile "apps" from google spreadsheets. It's amazing and very powerful. But as of now you can't really embed it in your course (it looks weird when embedded).
- LauraIngleCommunity Member
Thanks so much! 😊👍
Get Outlook for Android
- PaulKizilos-e22Community Member
If there is still some interest, I could post a newer way of doing this (still free) that works for me.
- SusanLeighCommunity Member
I’d be interested in reading more about your newer way
- PaulKizilos-e22Community Member
Okay. I will write it up for you, but here is a quick summary. I just completed a leaderboard for a game project, and it worked out great. It uses a free data store on the web (Airtable or Baserow both work). I chose Baserow because I found it easier to use plain javascript in my course. The leaderboard gets included wherever I need it as an HTML and javascript web object that retrieves (via Baserow API) and displays the leaderboard data. There is some data parsing that happens here, but it is very straightforward. Javascript interactions in the game capture and post the score to the data store via the Baserow API. I also allow the user to delete their data from the leaderboard for any reason (again via the API). The trick is that a web object is static when included in the project and published. But the javascript in the web object dynamically adjusts the DOM (HTML page elements) based on the retrieved leaderboard results, whenever that happens. I show the leaderboard at the end of the game, after the current user has posted their score.
- LauraIngleCommunity Member
Got it to work. Apparently you need to set up ALL of the variables in storyline 360, not just the three (userName, userScore, and topTen). I had to set up ALL the variables outlined in the javascript that reference those three storyline variables. (i.e., scoreVarName, userVarName, topTenVarName, topTenMsg). After I added all of the variables to storyline, then everything worked.
- onEnterFrameCommunity Member
Hi, Glad you got it working!
I think it should have been working without setting up the JS vars in SL. The SL var names go in the first lines of the javascript (along with your sheet URL)
If you want me (or anyone on this thread) to take a look at it you can upload your file here.
- LauraIngleCommunity Member
Yes, you are correct. It's working now and also with just the SL variables. Thanks!
I really like this and would love to customize this even further to show data by challenges in the game. I guess I'd add more columns. Would also like to style it up more, show badges, and player avatars. But that's a bit out of my league. ha! Someday!
Can this be done with an Excel Spreadsheet and hosted from a private server to collect data? Maybe with Javascript instead of GAS?
- LauraIngle-2da7Community Member
Hi James,
I followed this a few years back and am looking to test this again in my gamification courses. I can't locate the sample files I had. The link you share is no longer available. Is it possible for you to share the GAS and Javascript for this process. I'd love to be able to test this again in SL360.
Thanks!
Laura
- AriffKhalid-25fCommunity Member
Hi Laura, you can give my files a go if you want
Thanks James for sharing here - it's always great to see more examples. :-)
- onEnterFrameCommunity Member
Good point Ashley!
You can play with a live Storyline example here and see how you rank! http://elbrotherscustom.com/jk/blogs/leaderboard/story.html- LauraIngleCommunity Member
Not working. Leaderboard is not loading.
- ChristiePollickCommunity Member
Hi, James! This is awesome, and I wanted to note that you would also be welcome to post over in our Building Better Courses forum to share with even more folks! :)
- onEnterFrameCommunity Member
Thanks Christie! I will post it there now.
- jackloganbill1Community Member
Thank you very much for sharing this, it works great and opens up a whole other world for anyone who wants to save / restore values. As much as I use Google Docs, etc., I was not aware of this capability. Thanks again!
Glad that you found value in this older post Jack :) Thanks for popping in to share. I saw you mention in another thread wanting the leaderboard functionality.