Automatic Launch Guides
Automatic Launch Guides are designed to provide users with helpful information and instructions when they visit a specific page. These guides are triggered based on the URL of the page, ensuring that users receive relevant guidance exactly when they need it.
How It Works
When a user navigates to a page, the system checks the URL of the page against the URLs associated with the available guides. If a match is found, the corresponding guide is automatically launched and displayed to the user.
Showing Guides Once Per Visitor
GuideSail offers a feature to ensure that each guide is shown to a unique visitor only once (by checking "Once Only"). This can be particularly useful for onboarding guides or tutorials that you don't want to repeatedly show to the same user.
GuideSail can determine whether a visitor has already seen a guide in two ways:
-
Automatic Detection: GuideSail can automatically detect if a user has seen the guide before. This method does not require any additional setup and works out of the box.
-
Visitor ID Method: If your product uses user accounts or IDs, you can use the
setVisitorIdmethod to explicitly set a unique identifier for each visitor. GuideSail will then use this ID to check if the user has already seen the guide. This approach is preferred when you have user accounts or IDs, as it provides a more reliable way to track guide visibility.
Example
import { guidesail } from 'guidesail';
// Set the visitor ID (e.g., user ID from your authentication system)
guidesail.setVisitorId('unique-user-id');
// Show the guide only if the user hasn't seen it before
guidesail.showGuide('guide-id', { once: true });
Advanced URL Matching
In addition to exact URL matching, you can use the * wildcard to match multiple URLs with a single guide. This is useful for providing guidance across a range of similar pages without having to create separate guides for each one.
Example
/products/*will match any URL that starts with/products/, such as/products/item1,/products/item2, etc./help/*/faqwill match any URL that follows the pattern/help/anything/faq, such as/help/product1/faq,/help/product2/faq, etc.
By using the * wildcard, you can create more flexible and powerful guides that cover a broader range of pages with minimal configuration.
Requirements
When editing the URL, the format must match the URL of the current page which the guide is being built on top of.