docs(product tours): add element targeting, button, and progression docs#14826
docs(product tours): add element targeting, button, and progression docs#14826
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
f1ce818 to
cbc8290
Compare
4e8a398 to
37a7118
Compare
|
|
||
| <Alpha /> | ||
|
|
||
| PostHog provides two ways to target specific elements for Product Tours: **auto** and **manual**. |
There was a problem hiding this comment.
describe what "elements" means specifically. maybe HTML, CSS, or other words work better here, your call!
| PostHog provides two ways to target specific elements for Product Tours: **auto** and **manual**. | |
| PostHog provides two ways to target specific webpage elements for Product Tours: **auto** and **manual**. |
| By default, we use a robust **automatic** targeting algorithm to find your elements. This is the recommended approach, but may need some configuration tweaks depending on your app. | ||
|
|
||
| If you prefer, you can swap to **manual** targeting, and provide a CSS selector for us to use for finding tour elements. |
There was a problem hiding this comment.
Let's match the section headers
| By default, we use a robust **automatic** targeting algorithm to find your elements. This is the recommended approach, but may need some configuration tweaks depending on your app. | |
| If you prefer, you can swap to **manual** targeting, and provide a CSS selector for us to use for finding tour elements. | |
| By default, we use a robust **automatic element targeting** algorithm to find your elements. This is the recommended approach, but may need some configuration tweaks depending on your app. | |
| If you prefer, you can swap to **manual element targeting**, and provide a CSS selector for us to use for finding tour elements. |
|
|
||
| Automatic targeting is the default for all tour steps. This is the recommended option for most cases, but read on to learn when it may not work, or when you may need to tweak its configuration. | ||
|
|
||
| When you select an element, we collect information such as class names and other attributes so we can reliably find it again later. |
There was a problem hiding this comment.
| When you select an element, we collect information such as class names and other attributes so we can reliably find it again later. | |
| When you select an element, we collect information such as CSS class names and other attributes so we can reliably find it again later. |
| 1. When you select an element, we gather many "groups" of selectors that match your element (and potentially other elements) | ||
| 2. These groups are sorted by specificity, so the groups matching the lowest number of elements are prioritized | ||
| 2. At tour runtime, we reverse this algorithm to see which elements are matched by each group | ||
| 3. Each found element gets a "vote" | ||
| 4. The element with the highest number of votes "wins" and is used for the given tour step |
There was a problem hiding this comment.
adding periods. these are complete and independent sentences.
| 1. When you select an element, we gather many "groups" of selectors that match your element (and potentially other elements) | |
| 2. These groups are sorted by specificity, so the groups matching the lowest number of elements are prioritized | |
| 2. At tour runtime, we reverse this algorithm to see which elements are matched by each group | |
| 3. Each found element gets a "vote" | |
| 4. The element with the highest number of votes "wins" and is used for the given tour step | |
| 1. When you select an element, we gather many "groups" of selectors that match your element (and potentially other elements). | |
| 2. These groups are sorted by specificity, so the groups matching the lowest number of elements are prioritized. | |
| 2. At tour runtime, we reverse this algorithm to see which elements are matched by each group. | |
| 3. Each found element gets a "vote". | |
| 4. The element with the highest number of votes "wins" and is used for the given tour step. |
| 3. Each found element gets a "vote" | ||
| 4. The element with the highest number of votes "wins" and is used for the given tour step | ||
|
|
||
| This process has proven to be far more robust than most other Product Tours products that simply build a single CSS selector for your chosen elements. |
There was a problem hiding this comment.
| This process has proven to be far more robust than most other Product Tours products that simply build a single CSS selector for your chosen elements. | |
| This process has proven to be robust than using a single CSS selector for your chosen elements. |
|
|
||
| For more interactive tours, you can choose **Element click** as a step's progression trigger. | ||
|
|
||
| With this option we will not show a "Next" button by default, and users will get to the next step by clicking on the current step's element. |
There was a problem hiding this comment.
| With this option we will not show a "Next" button by default, and users will get to the next step by clicking on the current step's element. | |
| With this option we will not show a **Next** button by default, and users get to the next step by clicking on the current step's element. |
|
|
||
| <Alpha /> | ||
|
|
||
| Each Product Tour step (or modal announcement) has a primary button and, optionally, a secondary button. Toggle on "custom buttons" in the Product Tour editor to configure your steps with these actions: |
There was a problem hiding this comment.
| Each Product Tour step (or modal announcement) has a primary button and, optionally, a secondary button. Toggle on "custom buttons" in the Product Tour editor to configure your steps with these actions: | |
| Each Product Tour step (or modal announcement) has a primary button and, optionally, a secondary button. Toggle on **custom buttons** in the Product Tour editor to configure your steps with these actions: |
| ## Next step | ||
|
|
||
| Default primary button behavior - moves your tour to the next step. | ||
|
|
||
| _Not available for announcements._ | ||
|
|
||
| ## Previous step | ||
|
|
||
| Default secondary button behavior - moves your tour to the previous step. | ||
|
|
||
| **Note:** if your tour causes users to navigate to another page, this action **will not navigate them back.** In these cases, we recommend disabling the secondary button, or swapping to a different action. | ||
|
|
||
| _Not available for announcements._ | ||
|
|
||
| ## Start tour | ||
|
|
||
| Ends the current tour and starts another one. This is great for triggering product tours from [announcements](/docs/product-tours/creating-announcements)! | ||
|
|
||
| ## Open link | ||
|
|
||
| Opens a given link in a new tab. | ||
|
|
||
| ## Dismiss | ||
|
|
||
| Dismisses the current tour or announcement. |
There was a problem hiding this comment.
Maybe use a table instead. I can see this going either way
| classes="rounded" | ||
| /> | ||
|
|
||
| When attaching elements to steps, you'll be able to choose between **Auto** and **Manual** targeting: |
There was a problem hiding this comment.
| When attaching elements to steps, you'll be able to choose between **Auto** and **Manual** targeting: | |
| When attaching elements to steps, you'll be able to choose between **Auto** and **Manual** targeting. |
| - **Auto**: simply click your element and we'll collect data about it so we can reliably find it again during tours | ||
| - **Manual**: you provide a CSS selector for us to target the element |
There was a problem hiding this comment.
| - **Auto**: simply click your element and we'll collect data about it so we can reliably find it again during tours | |
| - **Manual**: you provide a CSS selector for us to target the element | |
| - **Auto**: Click your element and we'll collect data about it so we can reliably find it again during tours. | |
| - **Manual**: Provide a CSS selector for us to target the element. |

Changes
product tours is moving fast! 😄 updating the docs to reflect some recent changes, and add missing config pieces
Checklist
vercel.json