Guide Skipping Step - No Element Even though there is an element
Hello from Summerville, SC,
I created a guide where there is a "split" after step 7. I added an element containing the JavaScript snippet "skip-step-no-element" (step 8) stating if the information from the element in step 9 is not found, go to step 11. In a scenario where the information in step 9 is not found the guides goes to step 11 without any problem. The issue is that when the information in step 9 is present, the guide still wants to advance to step 11. I have tried to ensure that the skipped element (step 9) CSS is tagged correctly, even using the Pendo Tagging Aid. Also, tried adding an element containing a JavaScript snippet for timing.
If anyone has any suggestions, please let me know. I really appreciate it.
David
Comments
Hi David Marshall,
Sorry to hear that you're not able to get the snippet (skip step no element) working properly for your guide. I'm guessing you are seeing similar problems if you try using another similar snippet here?
Hope that others in the Community can chime in if they've seen similar issues and have ideas for solving, but if you do need to contact our Professional Services team, they can inspect your guide and work further to check on the JS snippet for you.
Hey Howard,
Thank you very much for responding and I will try the snippet that you have provided. I really appreciate it!!
Just to just to follow up, I am still having issues with the guide as described in my original post. Would anyone know of or has a timing snippet that I can add to the guide? Also, if anyone has any other suggestions, please let me know.
Hi David Marshall,
Thanks for your follow up and sorry to respond with another snippet but this is the closest we have in terms of "timing" or delaying a guide step:
https://github.com/pendo-io/snippets/blob/master/guides/delayGuide/delayGuideDisplay/delayGuideDisplay.js
I'm not as familiar with combining these two aspects of the snippet with the timing part, but this might be something to consult with our professional services team if you're interested for more guidance.
Hope this at least gets you a little closer! Thanks Howard
Thanks for the quick response. I really appreciate it. I will try the snippet on the guide to see what happens. Enjoy Pendorama!!
Has anyone ever figured this out? No matter which skip variation I use, it stops the tour dead if the element IS there.
Not yet, I will work on this guide some more either today or tomorrow to see if I can figure out anything.
Hi all, trying to work on this from https://github.com/pendo-io/snippets/blob/master/guides/goToGuideStep/goToStepNoElement/gotoStepNoElement.js
Is there anything that needs to be replaced or filled in in his code here besides var desired step = 5?
})();
Thanks so much!
At first the only change was vardesiredStep = #. However, some of the guides that I was working on was having timing issues. Working with Mark Goings, Eric Miller, and Kristine Enerio, there following change was made (in bold).
// GoTo a specific step if no Element visible
(function goToStepNoElement() {
// Warning: .getPositionOfStep() is 1-based
var nextStep = guide.steps[guide.getPositionOfStep(step)];
// The step of your guide you would like to go to when the element of the subsequent step isn't present
var desiredStep = 18; //<--Step number as displayed in Pendo
/* If you must defer this to guide load time or if the element is not already visible
pendo._.defer(function(){setTimeout(function checkElementAndSkip() {*/
(function checkElementAndSkip() {
var results = pendo.Sizzle('[data-bind*="gridModel.hasSecurityFeatures() "][style="display: none;"]');
if (results.length > 0 || pendo._.some(results, pendo.isElementVisible)) {
pendo.log(guide.id + ':advance to designated step');
// Use the line below if you don't want to utilize the Step ID directly and would rather use the step count
pendo.goToStep({destinationStepId: pendo.getActiveGuide().guide.steps[desiredStep-1].id});
// Use the line below if you know the specific Step ID (generally a stronger reference)
//pendo.goToStep({destinationStepId: "N9d7QgG8ZxOBqeUmZr4dn92yltE"}); <-- Example Step ID
} else {
pendo.log(guide.id + ':advance 1 step');
pendo.onGuideAdvanced();
}
})();
})();
That change helped with the timing issue that I was having. Hopefully this helps.
Please sign in to leave a comment.