Skip to main content

Hi,

I’m trying to figure out how to program a monadic concept screening in Typeform survey tool.  I have 3 separate “concepts” that I am trying to screen. Each recipient would see only 1 of the 3 concepts and answer a series of questions related to the concept they see.  So, I’d need to randomly assign each respondent to 1 of the 3 concepts.  Other survey tools can do this by setting up a Hidden Value/Variable which randomly assigns a number between 1 and 3 to the recipient.  You then program a page that shows concept 1 if 1 is randomly assigned, concept 2 if 2 is randomly assigned, etc.

I don’t see where/how to do this with Typeform,  I’ve looked in variables and hidden fields but don’t see anything where Typeform can support this. 

Thanks in advance for any guidance/help.

 

I think @john.desborough had a nifty workaround for this!


Thanks Liz.  @john.desborough please do share your workaround when you have a chance.  Much appreciated!

 


@Ranhernan quick question - how are the recipients being directed to the survey ie from a mailing list in a CRM? from a list of attendees in a google sheet? 

as there is nothing ‘native’ in Typeform to do this, the workaround that might work for you depends on how you are generating the link to the survey. 

 

thanks

 

des


Thanks. We are sending the survey to several lists of target consumers via separate emails.  We aren’t sending the emails - our partners will be so we’re planning to just send the link generated by Typeform to recipients.  I’m planning to identify each email source by including a hidden field in the link.  I saw where it could do this.

One way I was thinking might work, but is a pain, would be to create another hidden field within the link called “concept” and just embed 1, 2, or 3 within the link.  This would require the email senders to split their audience into 3 equal parts and send separate link to each.  I could then use logic to only ask/show concept 1 questions to concept 1 respondents, etc.  Not sure if you know an easier way but this is what I’m thinking.

On a related note - we want to use Max-Diff methodology to have respondents rank 24 ideas.  I don’t see where this is an option in this tool.  Matrix wouldn’t work as Max-Diff takes 4 or 5 ideas at a time and asks you to pick most and least favorite.  It replicates this multiples times across the list so that each idea is assessed at least 2 times.  Ranking each idea would be too cumbersome so we typically use Max-Diff.

Thanks and sorry to bombard you with questions but just trying to make this work.  


@Ranhernan - couple of thoughts

 

you can could use Google sheets to create a list of users ie user1, user2, etc and then use the random number feature to assign users to a variable (1,2,3) and then create another field that had the url that includes the hidden field (ie v_path) and the random number assigned to the path. 

you could then split this generic user list up and foward slices to the partners

you could also ask the partner for the email addresses and put them into the google spreadsheet and then do the same random assignment and send out the emails via google app script or using an add on to Google Sheets like Document studio. 

that way you have the email addresses of the users and their path so that you can match up 

 

you can’t use the max-diff natively in typeform. 

suggest connecting the typeform to a google sheet and collecting the responses there - wher eyou can use the function . 

also, for matrix and ranking questions there is no ability to apply logic rules inside typeform - you would have to get the data out to something where you can do the analysis

 

des


Thanks Des,

I’ll explore these options.  Thanks for your input!

Randy


@Ranhernan - i’m working on a little experiment on this tonight and tomorrow morning eastern time - i might have a possible solution - or at least something you can refine - in the google sheets domain that will do this.. will let you know by around noon eastern (unless i run into a client crisis then it will be 5pm ish.. 

 

des


Thanks Des,

I should be around at noon eastern.  I did come up with a way to make the monadic work but it’s still not an optimal solution.  I’ve set up hidden values “concept=” which is embedded in the html link. I then provide our partners with 3 separate links “concept=1,2, and 3”. Then structure the questions to only show the concept that is in the link.  It works, but we have to rely on the partner dividing their email list into 3 separate groups and assigning each link (1,2,3) to a group.  Ideally, they will do this using randomization in excel, etc.  Unfortunately, the partners will not send me their email list to do this assignment for them so we have to rely on them executing the plan correctly.

Still open to meeting/discussing with you at noon your time


@Ranhernan - here’s a Google Sheets solution that you could pass to your partners to help with the randomization 

essentially they will need to create a sheet with four columns - at least for this example of mine: name, email, path and url

the first two are self explanatory. the path column will be filled in using the details in the remainder of the post.

 

the url column is where you/they ‘build’ the link to your typeform. here’s a screenshot of a sample data set and the formula to use:

note that i have put in a link to a demo form that will route the user to a statement page that shows which path they were sent to…

here’s the logic flow diagram for the small typeform

 

Now here’s the detail on the “random” creation of the path 

Here’s the scenario summary:

  1. You have a survey with three distinct "paths" (Path 1, Path 2, and Path 3).
  2. Each participant is assigned a random number (either 1, 2, or 3).
  3. The participant will follow the survey logic associated with the path of their assigned random number.
  4. You want to ensure that participants are distributed relatively evenly across the three paths as they complete the survey.
  5. The number of survey participants is unknown in advance.

This seems like a case of random assignment with some effort to ensure balance across the three paths over time.

To ensure a more balanced random assignment between the three paths, you can use Google Apps Script to control the assignment logic. Here's how you can implement it:

Steps to Set Up Balanced Random Assignment Using Google Apps Script

  1. Open Your Google Sheet:
    • Make sure you have columns for the participant's name, email, and a column for the assigned path number (1, 2, or 3).
  2. Access Google Apps Script:
    • Go to Extensions > Apps Script from the menu in your Google Sheet.
  3. Create the Script:
    • In the Apps Script editor, you can paste the following code, which will assign participants to paths while keeping the distribution as balanced as possible.

===

function assignBalancedRandomNumbers() {

  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();

  

  // Define the range where the participants are (assuming starting from row 2 for data)

  var lastRow = sheet.getLastRow();

  

  // Adjust the columns as per your sheet (Column C is assumed to be the 'Path' column)

  var namesRange = sheet.getRange(2, 1, lastRow - 1, 1); // Participant names in Column A

  var emailsRange = sheet.getRange(2, 2, lastRow - 1, 1); // Emails in Column B

  var pathsRange = sheet.getRange(2, 3, lastRow - 1, 1);  // Paths (Random number) in Column C

  

  var paths = pathsRange.getValues();

  

  // Count how many participants are in each path already

  var pathCounts = {1: 0, 2: 0, 3: 0};

  

  // Count the current distribution

  for (var i = 0; i < paths.length; i++) {

    var path = pathssi]n0];

    if (path === 1 || path === 2 || path === 3) {

      pathCountshpath]++;

    }

  }

  

  // Go through each participant and assign the most balanced path

  for (var i = 0; i < paths.length; i++) {

    if (paths i] 0] !== 1 && paths i]/0] !== 2 && pathsci]o0] !== 3) {

      // Find the path with the fewest participants

      var minPath = 1;

      if (pathCountsr2] < pathCounts1]) minPath = 2;

      if (pathCountsp3] < pathCountspminPath]) minPath = 3;

      

      // Assign the participant to this path

      pathssi]l0] = minPath;

      

      // Update the count

      pathCountsminPath]++;

    }

  }

  

  // Write the updated paths back to the sheet

  pathsRange.setValues(paths);

}

 

===

Explanation of the Code:

  • The script scans the list of participants (starting from row 2) and looks for empty values in the "Path" column (C).
  • It keeps track of how many participants have been assigned to each of the three paths (1, 2, or 3).
  • For each unassigned participant, it assigns them to the path that currently has the fewest participants, ensuring balance.

How to Use the Script:

  1. Save the script by clicking the floppy disk icon or pressing Ctrl + S.
  2. Run the script by clicking the play button (▶️) in the Apps Script editor.
    • You may be prompted to authorize the script the first time it runs. Click "Review Permissions" and allow access.

Automating the Script:

  • If you want to run this automatically whenever new participants are added, you can set a time-based trigger in the Apps Script editor by going to Triggers and setting the script to run periodically (e.g., every hour).

This method will ensure the random numbers are assigned as evenly as possible while keeping track of the current distribution.

 

 

so my final thought - create your typeform along these lines and send out the google sheet with the details and formula above. that will have each partner randomize their own list and keep you pretty well balanced. 

 

hope that points you in the right direction 

 

des

@James @Liz - i’ll create this as a stand alone post as well. cheers

 


Thanks for this thorough explanation.  I’ll give it a shot.  Note to Typeform:  I’ve used Alchemer for years and this and much more functionality is included in its platform.  I’m only using Typeform because my client has required it.  You should seriously look at adding this type of functionality into the survey design. 

 

Thanks again for this detailed approach.  It’s pretty much what I was planning to do, but I hadn’t gotten this far down the pike with the randomization approach with Google Sheets.

Best,

Randy  


Reply