Skip to content

docs(product tours): add element targeting, button, and progression docs#14826

Open
adboio wants to merge 1 commit intomasterfrom
02-05-docs_product_tours_add_element_targeting_button_and_progression_docs
Open

docs(product tours): add element targeting, button, and progression docs#14826
adboio wants to merge 1 commit intomasterfrom
02-05-docs_product_tours_add_element_targeting_button_and_progression_docs

Conversation

@adboio
Copy link
Contributor

@adboio adboio commented Feb 6, 2026

Changes

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

Checklist

  • I've read the docs and/or content style guides.
  • Words are spelled using American English
  • Use relative URLs for internal links
  • I've checked the pages added or changed in the Vercel preview build
  • If I moved a page, I added a redirect in vercel.json

@vercel
Copy link

vercel bot commented Feb 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
posthog Canceled Canceled Feb 6, 2026 6:35am

Request Review

Copy link
Contributor Author

adboio commented Feb 6, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@adboio adboio requested a review from a team February 6, 2026 06:10
@adboio adboio marked this pull request as ready for review February 6, 2026 06:10
@adboio adboio force-pushed the 02-05-docs_product_tours_add_element_targeting_button_and_progression_docs branch from f1ce818 to cbc8290 Compare February 6, 2026 06:11
Copy link
Member

@edwinyjlim edwinyjlim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

siiiiick


<Alpha />

PostHog provides two ways to target specific elements for Product Tours: **auto** and **manual**.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

describe what "elements" means specifically. maybe HTML, CSS, or other words work better here, your call!

Suggested change
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**.

Comment on lines +15 to +17
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's match the section headers

Suggested change
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Comment on lines +26 to +30
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding periods. these are complete and independent sentences.

Suggested change
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:

Comment on lines +13 to +37
## 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Comment on lines +32 to +33
- **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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants