New vs existing users

Sometimes you may wish to show different tours to users based on how long they have been using your app. For example you may only want to show certain tours to users who have using your app for a certain amount of time. In this example we are going to explore how have a tour only show to users who have joined in the last x days.

1. Pass date of when user signed up to HelpHero

In this example we are going to pass a createdAt user property to HelpHero. The name used is not important for example you may wish to use sign_up_date, created_date, startDate etc. However the property passed must be a JavaScript Date object.

<script>
  // assumes user object with id (string or number) and createdAt (Date) exists in scope
  // the implementation will varying depending on your development setup
  HelpHero.identify(user.id, { createdAt: user.createdAt }); 
</script>
Note: this code will vary depending on the server language and frameworks you are using. Please consult with your development team and get in touch if you need more information.

2. Setup a funnel

Now that HelpHero knows about this new user property you can setup tours to only show if the user signed up within certain time frame. In this example we only want to show the tour if the user has signed up in the last 7 days.

In some scenarios you may want to only want to automatically start the tour for new users but have it available to all users via a checklist. This can be achieved by adding a triggered by funnel condition.