Create quizzes in Hubspot

SOLVE
New Contributor

So we have the need to create quizzes as part of an online learning platform we're custom building in our Hubspot website. 

We've attempted to use smart lists and workflows to "grade" answers and generate basic metrics (# correct, etc.). However the grading via workflows is too slow as workflows are too variable in time to run - we need instant results upon quiz "submit."

We need the results stored in the contact's profile, with historical, meaning each subsequent score should be recorded independently. We also need the ability to drive simple metrics, i.e. "average test results," "average question results," etc. per contact and per contact group.

 

Has anyone built something like this, or can provide guidance on where we can have something like this built?

Would be nice if Hubspot could build a "quiz mode" for its forms, like Surveymonkey does... it's also unfortunate that the Surveymonkey results aren't available in real-time to Hubspot..

1 Accepted solution

Accepted Solutions
HubSpot Employee

Hi @glepine9176,

 

I was thinking through this a little more, and another way to achieve this with relatively standard functionality of tooling (requiring as little coding as possible) is going to be using something like Typeform and embedding those forms on your HubSpot pags. Typeform allows you to do calculations/scoring based on responses, and then more robust redirects/certificates (i.e. https://www.typeform.com/help/automatically-generate-certificates-from-quizzes-or-exams/)

 

You could then connect those submissions to HubSpot forms pretty easily via Zapier.

Would love if this was native functionality in HubSpot, but a connection of these tools should help you get you where you need to go!

14 Replies 14
Anonymous

Hey @glepine9176 check out HubSpot's integration directory, you might find what you are looking for in a HubSpot integration partner. 

 

@bradmin is one of the Community's integration thought leaders, he might have recommendations for you Smiley Happy

Reply
0 Upvotes
Community Manager

This is also something that HubSpotters @Ty@Julien and @robertainslie explored (though not quite in the way you are describing). They used HubDB to gamify the HubSpot Academy - check it out here: How HubSpot Academy is Gamifying Your Learning with HubDB

 

 

Reply
0 Upvotes
Esteemed Advisor

Thanks, @Anonymous. It does look like there might be integrations which can get that data to HubSpot via Zapier, but @glepine9176 mentioned that waiting for workflows to calculate was inhibitive.

 

If that's the case, since no native integration covers this functionality, Zapier is only going to zap results to HubSpot once every 15 minutes. Even the heaviest of workflows should still be able to process contacts more quickly than 15 minutes, and that sounds like an undesirable timeframe here. 

 

I personally haven't worked with any integrations which use this functionality, but it looks like Quiz Maker is something that's compatible with Zapier. That handles the core functionality, but will not be faster than HubSpot workflows, broadly speaking. 

 

As a general rule, if you're looking for functionality that HubSpot doesn't offer, it either means using an unsupported integration, or doing your own development work. If you opt for the former, you're at the mercy of the rules, administration, and configuration of the integration. So if zapping Quiz Maker results to HubSpot isn't fast enough to meet needs, the only remaining solution is to write one on your own.


Brad Mampe, Salesforce Analyst, Fidelity
I'm probably wrong. I may not be right about that.
Community Manager
Community Manager

Thanks for the mention @roisinkirby

 

Hi @glepine9176,

I'm Ty, the web designer on HubSpot Academy. In addition to the Inbound Speed Round game we created, I have worked on the certification platform that the Academy uses, as well have built a couple 'grader-style' apps that may help you out here.

Let's start with the one Ró mentioned...

 

Inbound Speed Round

ISR is an app that we created to allow our INBOUND attendees last year to play and win prizes. It was initially built for live play, then scaled up into a web-app. Basically, this app is made up of a few things:

1. A call to a JSON file (This stores all our questions)

2. JS(jQuery) that is used to dynamically create/generate the board

2.5. Code to store basic information in the browser's local storage

3. A form to submit the information (name, email and score) to our contacts DB

4. An api endpoint that allows us to post the info (name, email and score) into HubDB.

 

However, based on what you want, here are some of the cons of this method:

- We don't store which questions a user got wrong

- We didn't really create any 'lockout' method to insure that people can only fail a few times before being able to play again

- HubDB creates a new row for every entry, rather than updating the existing

 

HubSpot Academy Certifications

So this may work a little better for what you want. In our certifications (you can read more about this here), we utilize a custom made app to handle the user functions, then for quizzes/tests we use a website called Brillium. 

 

Grading app

Fair warning, this one is a little hacky... At my old job, we wanted to build a grader that allowed us to give a score for how a user was doing with their fundraising. We took information such as "Contacts DB size", "Last year's vs This year's gifts", and "Retention amounts" to generate a score between 0 and 400. I have created an example of it on my codepen that you can check out. In this instance all of the calculations and math are done client side, then using a form hack* we were able to push each form field to the database.

 

*The form hack I am mentioning is, if you create a form in HubSpot, embed it on a page and then clone that HTML onto a page, you are able to print it to your contacts database. Now, since we did all of our calculations client side, the user can see their score at the end, then has an option to submit. On submission, we had some workflows set up that allowed us to send them information based on sections they were sub-par in. For your case, you could probably hide the end score, have them submit, then email them results. 

 

Some cons of this method are:

- It's pretty hacky, unfortunately Smiley Sad

- Some workflows take a little while to send out

- We didn't build a random question type thing

- You would need a form field on the form AND a contact property for every question

 

 

Truthfully, I would say if you want to build up a quiz, look into ways to pull a JSON file (your questions) into a javascript webapp. Buiid it as a standalone, then bring it onto your website. This is going to have to be a pretty custom creation, since HubSpot doesn't have anything completely out of the box for this use case.

 

Hope this cleared some things up! Let me know if there is anything else I can answer.

-- Ty

HubSpot Employee

Hey @glepine9176 / @roisinkirby

It will be difficult to achieve all of the requirements you've laid out without a custom integration to achieve this. There's a few ways to attempt this, but all of them require some level of customization and development time (JS/HuBL/perhaps a Node.js server).

 

Depending on the level of complexity of scores, you could keep everything the same as you currently have, but add a 'delay' or intermediary page that would allow HubSpot Lists/Workflows the time to run. I've helped achieve this in the past by adding a javascript 'spinner' that runs for a few seconds, counts down, and then injects a link/button to take to the visitor to the results page. The user follows this link to a final page that contains Smart Content or personalization tokens on the final page to show the visitor their results. This is the most straightforward and easiest to implement option.

 

Alternatively, you could attempt to use HubDB with various filtering options to show results pages. This would probably be less score based than 'combination of question results' oriented. HubDB allows you to call a data table to display on your site, and pass in filters that only return rows that meet the filter criteria. Not knowing the application and data involved, I'm not sure if your quiz score would be a good fit, but you could probably make something work. If you combine this with some custom javascroipt or a custom form submission, you could store the end results on a form via a call to the Forms API.

 

The most difficult aspect will be appending each of the options to the contact record and not having each of them overwritten after multiple quizzes are submitted. The 'multiple checkbox' contact property type is the only option that Workflows can append to, otherwise, the value will be overwritten. I could see a use for an Azuqua or Zapier integration to do the append and re-write back to the HubSpot contact record, but that would add a fair amount of complexity. 

 

The most robust way to do this will be to have a custom form that submits to a custom server that calculates and returns the responses, and then updates to a HubSpot contact. Depending on if you're using HubSpot Deals for actual revenue tracking, you could create a new deal pipeline and store each 'quiz' as a new deal. This is the 'many-to-one' data type in HubSpot that can be used for interesting purposes like this.

 

 

 

HubSpot Employee

Hi @glepine9176,

 

I was thinking through this a little more, and another way to achieve this with relatively standard functionality of tooling (requiring as little coding as possible) is going to be using something like Typeform and embedding those forms on your HubSpot pags. Typeform allows you to do calculations/scoring based on responses, and then more robust redirects/certificates (i.e. https://www.typeform.com/help/automatically-generate-certificates-from-quizzes-or-exams/)

 

You could then connect those submissions to HubSpot forms pretty easily via Zapier.

Would love if this was native functionality in HubSpot, but a connection of these tools should help you get you where you need to go!

Community Manager
Community Manager

+1 on this idea @robertainslie!

 

I always forget about how useful zapier can be. This is essentially how we did the Marketing Grader I mentioned, except we used our own JS.

 

If you don't have a huge code background, the typeform/zapier solution should work out pretty well.

Reply
0 Upvotes
Esteemed Advisor

Zapier will not be a feasible option, if workflows are too slow, from the original post. It's an effective solution, absolutely. But it will not be faster.


Brad Mampe, Salesforce Analyst, Fidelity
I'm probably wrong. I may not be right about that.
Reply
0 Upvotes
HubSpot Employee

Typeform does the calculations and shows the results (built-in). The Zap is just to get that data to HubSpot eventually.

Esteemed Advisor

I suppose I'm reading "we need instant results upon quiz submit" differently. Since that was done in-app previously, I'm sort of taking things at face value. I'm measuring the "time" as how long it takes for the entire job to complete, until the time the properties get updated and the automation executed in HubSpot. 

 

If, instead, that means, "I need grades calculated as quickly as possible on submit, then the data can get to HubSpot afterwards," yours and Ty's recommendations make a ton of sense. 

 

But if the original poster is looking for the form results to get graded, so HubSpot can do something with it, I'm not certain Typeform/Zapier - or any other integration which has some sort of delay or scheduled jobs to sync data to HubSpot - is faster than the workflow scheme they're currently using.

 

[Edit: Based on the followups, I was off the mark. This is what I get for posting in places where I have no business doing so.]


Brad Mampe, Salesforce Analyst, Fidelity
I'm probably wrong. I may not be right about that.
Reply
0 Upvotes
Highlighted
Community Manager
Community Manager

If we assumed that they want to show a score first, and then do something with HubSpot. It's probably be easier to run some math functions in Javascript and pass the "end_score" variable around until the end, where they could show on either the existing screen, or on a followup screen.


We did this with Inbound Speed Round. We store a variable for their score, pass it around, then at the end of the game, ie: (timer hits 0), we push it to Local Storage. Then the final submit score sends a hidden form and redirects the user to the scoreboard page.


For things like this, Localstorage is perfect as it's clientside, but then you're still able to push to the contacts database. And if you're worried about hogging someone's storage, you could run a remove on the key value once the scoreboard page loads. For people who may wan't to know how this works, here is a quick small mock up:

 

Javascript localstorage

// set your variable for user's score
var score = ''

// functions for your quiz
//at the end, based on an event you want to run something like
localStorage.setItem('game_score', score);
// the word in '' is what your variable will be named in browser/console
// the word without quotes is us saying we want this variable to set

This kind of set up would then leave something in the user's browser storage, that looks like this.

 Screen Shot 2017-06-09 at 1.58.23 PM.png

So now, the user has score saved in browser. LocalStorage items don't really have a specific expiration date, they are mostly up to the user. These things can be removed if the clear the cache, delete history, remove the items from their storage by hand, or you programatically do it.

 

So after you redirect, you need to get that variable again, so now you need a new function on page 2.

//From here, we will be pulling your variable out of storage
//do this on load

//if game score doesn't exist
if( localStorage.getItem('game_score) === null){
console.log('no score saved');
score = 0;
} else {
console.log('saved score found');
score =  localStorage.getItem('game_score);
}

You want to always check if the item is 'null', this will tell your browser whether to execute code. Now that you have retrieved the score, you can print/append it.

 

Now that you have grabbed the score and updated, you can now either leave it and let the user keep updating it as the take the exam, or remove it when they leave the page.

//on browser tab close/leave
//when browser closed - psedocode
$(window).unload(function(){
	localStorage.removeItem('game_score');
});

//or remove on click
$(".click_me3").click(function(){
	localStorage.removeItem('game_score');
  var score = 0;
   $('.score').html(score);
});

To help further explain this, I mocked up a JSFiddle for you to try out, follow the buttons and watch in the local storage to see what happens. This demo will do the following:

1. Set the score on click of the red button

2. Retrieve score from storage and place in scoreboard on click of the blue button (or console log a fail if score doesn't exist)

3. Remove the score from storage and scoreboard if you click on the green button OR exit the tab

 

So to summarize this, if you need the user to see information before you can log it in HubSpot, local storage is an awesome way to pass a variable or two around pages. Local storage is specifically tied to the computer it's set in, so there are also no major security flaws in it. However, I wouldn't store passwords in it. Also, if someone has some JS know-how they could set an item from console and transfer through pages. You will want to make sure to check whether buttons are clicked with conditionals as well. 

 

Hope this helps!

-- Ty

New Contributor

This did the trick I also spoke with Sarah Bedrick over there at Hubspot who told me Hubspot actually first lookedat Typeform for your learning platform before budiling it inhouse..

 

So I decided on Typeform! It gives us instant results, and we set workflows around the results to increment their quiz attempts / correct vs incorrect answers / etc. in Hubspot. Exactly what we needed.

 

Thanks for this! But yeah, y'all should really think about adding a "quiz mode" to your forms eventually...

New Contributor

The page no longer exists and I am looking for this solution as well. Any new/updated recommendation?

Reply
0 Upvotes
HubSpot Employee

@vanessaELabs - I would still recommend using TypeForm. Here's an updated URL on their knowledge base about creating a quiz: https://www.typeform.com/help/create-a-quiz/

 

They also have a nice integration with HubSpot: https://www.hubspot.com/product-updates/typeform-integration and https://www.typeform.com/help/send-new-contacts-to-hubspot/