Answered

Is it possible to conditionally show a product tour based on a presence of an element?

  • 29 July 2021
  • 1 reply
  • 324 views

I would like to have the Product Tour show up only if we have a particular element on the screen (e.g. start it only if we have a particular box on the screen).

 

The solutions that I can think of are:

  1. Trigger a JS event once the box has shown up and then filter if the event has a count of greater than 0. However, that doesn't seem to always work for us. Once the event gets trigger, the product tour doesn't show up. We seem to have to always refresh the page in order for the tour to show up.
  2. Do something like this - Intercom('startTour', tourId) - aka trigger this event once the element shows up. However, this requires us to create the product tour first and find the tour id.

 

Are there better ways of doing this? Ideally, I would like to just have something in the product tour setup to specifically say "if this named element is present, start this tour".

 

For context, we have a React based application that has a lot of interactivity.

icon

Best answer by Roy 29 July 2021, 14:21

View original

1 reply

Userlevel 1
Badge

Hello @michelle c11​ ,

 

You can also add some people's attributes, call them "elements" and send all the elements in text format separated by a comma.

Example:

"Elements = Name1, Name2, Name3"

 

Then during product tour configuration, select the following element in rules and contains = Name1.

 

In this way will be much easier to develop and launch this ASAP.

Reply