Can I Launch Guides Based on Poll Responses?

I'd like to launch conditionally branching guides based on which multiple choice poll option a user chose. I believe this could be possible with custom code, but it doesn't appear to be readily available outside the box. Is there a custom code in circulation that folks are using in order to launch specific guides based upon which specific poll question a user has clicked in a multi choice poll?

2

Comments

4 comments
  • Here are a couple of options...For a more simple workaround since there is no out of the box conditional logic (I am aware of) for the basic poll building blocks, you could use a text block for your question and then multiple buttons to gather your responses. Then you could branch each button however you want to go with some dismissing the poll and others advancing to a next step with an open text prompt. You wouldn’t get official “poll” analytics but you would get analytics on each button.

    If you are comfortable working with custom code you could explore this post Creating A Multi-Choice Poll With A Conditional "Tell Me More" Text Box

     

    2
  • Thanks Eric Miller! This is exactly the answer I was hoping for. Looks like the custom code block could be further augmented and would be the best way to go.

    0
  • Hi Jim Dyer did you ever get the custom code solution to work? If you wouldn't mind sharing, it would be a huge help to the community. Thanks!

    0
  • Thanks Eric!

    The code would make the survey not show up for me at all. I had to tweak the code to remove two ".parentElement"s after the "._pendo-open-text-poll-wrapper')[0].", and then it worked for me. See below.

     

    var textBoxQuestionText = "Tell us more about your goal";
    var isTextBoxVisible = true;

    if(!pendo.designerEnabled) {
        pendo.dom('._pendo-open-text-poll-wrapper')[0].parentElement.style.display = "none";
        pendo.dom('.bb-text:contains('+ textBoxQuestionText +')')[0].style.display = "none";
        isTextBoxVisible = false;
    }

    pendo.dom('.pendo-radio').on('click', '.pendo-radio', function(e) {
        if (e.target.parentElement.innerText=="Other" && !isTextBoxVisible) {
            pendo.dom('._pendo-open-text-poll-wrapper')[0].parentElement.style.display = "block";
            pendo.dom('.bb-text:contains('+ textBoxQuestionText +')')[0].style.display = "block"; 
            isTextBoxVisible = true;
        } else if (e.target.parentElement.innerText!="Other" && isTextBoxVisible) {
            pendo.dom('._pendo-open-text-poll-wrapper')[0].parentElement.style.display = "none";
            pendo.dom('.bb-text:contains('+ textBoxQuestionText +')')[0].style.display = "none";
            pendo.dom('._pendo-open-text-poll-input')[0].value="";
            isTextBoxVisible = false;
        }
    });

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post