Skip to main content

Hey,

Do the Product Tours javascript intergration offer a Javascript callback?

I want to identify (on site) when a product tour has started for a user.

Flow:

  1. User visits a given page on the website
  2. Product Tour starts
  3. I need to check if a certain element is on the page as this is used by the tour. There is a few user cases when it wont, and I therefore need to run some custom (on site) Javascript to show that element.
  4. Workflows or webhooks won’t help in this situation, as I need to check and show the on-site element as soon as the tour starts. (well, actually before step 3)

Ideas:

  • Javascript callback when the tour is started
  • OR Javascript callback when a ‘next’ button is clicked on the tour
  • OR another way to programatically (on-site) determine either of the above.

If this is entirely not possible, is there a way to detect if a user is due the tour?

At the moment the tour uses normal settings within the Intercom > Product Tour (i.e. show once, the first time the user meets given criteria). If I can disable the automatic showing within Intercom, but instead trigger it on site with `Intercom('startTour', tourId)`, then I can trigger my custom Javascript on-site at the same time.

BUT to acehive this, I need to know on-site if the tour should be shown or not, otherwise everytime the user visits the page the tour will be triggered by `Intercom('startTour', tourId)`.

I could do this interally, recording if the user has seen the tour in my local database or indeed a Intercom > User > Custom Attribute, but that seems inefficient. If a user has done a tour, is this stored against their User record and then available programatically (i.e. removing the need for a custom attribute)?

Thanks

Rob

 

 

 

Hi@Rob Bathgate -- Cam from the Intercom Support team here. 

Thanks for the great questions and explanation! 

At present there is no JS callback function for Tours, nor is there a way to specifically detect if an end-user is due or about to trigger/receive a Tour. From the fantastic context you’ve provided there I can certainly understand how having these capabilities would be quite useful and are both capabilities that have been requested previously so have been submitted as a Feature Request to our Product Development team for them to consider. I’m going to open a conversation in Messenger with you so I can log you’re interest in these to the respective Feature Requests. 

Your points around the issue with using the “Intercom(‘startTour’, tourId)” JS API Method are spot on - I completely agree with what you’ve said there.

With regard to data on whether an end-user has done a Tour - this is stored programmatically but I believe it’s stored against the Tour rather than the User; either way the data is not (easily or directly) available programmatically. The data on a users progress through a Tour is technically available via the Data Export model of our API, but this model requires an export request to be Created, the export would then be run and once complete could then be Downloaded in a continuous stream in gzipped CSV format.

Hope that all at least helps clarify and confirm what is possible at the moment. The context you’ve provided there will be an incredibly useful addition to the Feature Requests, the team take these into serious consideration so giving them as much of an understanding around how our customers are looking to use the requested capabilities goes a long way. 

Let me know if there’s anything I can clarify further or if you have any follow-up questions!

 


Reply