Page Rules
Page Rules let you customize how the widget behaves on different pages of your website. Instead of showing the same message everywhere, you can tailor the heading, subheading, and greeting video for specific pages — so visitors on your pricing page see a different experience than visitors on your homepage.
What Are Page Rules?
A page rule is a set of customizations tied to a specific URL or URL pattern on your website. When a visitor lands on a page that matches a rule, the widget displays the custom content you defined for that rule instead of the defaults.
You can create as many rules as you need, each targeting a different page or set of pages.
Creating a Page Rule
To create a new page rule:
- Go to Settings > Widget > Page Rules
- Click Add Rule
- Configure the rule settings (described below)
- Save your changes
URL Matching
Each rule needs a URL condition that tells the widget when to activate. You have two matching options:
- Exact match — The rule activates only when the visitor's URL matches the one you entered exactly. Use this for specific pages like
/pricingor/contact. - Contains — The rule activates when the visitor's URL contains the text you entered anywhere in the path. Use this for broader matches, like triggering on any URL that contains
/blog/.
Use contains matching when you want a rule to apply across multiple related pages. For example, a rule with "contains /products/" will match /products/shoes, /products/hats, and any other product page.
Custom Heading and Subheading
You can set a custom heading and subheading that replace the default widget text when the rule is active. This lets you speak directly to what the visitor is looking at.
For example:
- On your pricing page, the heading could be "Have questions about our plans?"
- On your demo page, the heading could be "Ready to see it in action?"
- On your support page, the heading could be "We are here to help"
Custom Greeting Video
Each page rule can have its own greeting video. This means you can show a personalized video message that relates to the content on that specific page.
For example, your sales team could record a short video for the pricing page that says "Let me walk you through our plans," while a different video on the support page says "Tell us what you need help with."
Learn more about uploading and managing greeting videos in Video Greetings.
Custom Widget Behavior
Beyond content changes, you can adjust widget behavior per rule, such as whether the widget opens automatically or waits for the visitor to click.
Enabling and Disabling Rules
Each page rule has an enable/disable toggle. This lets you turn rules on and off without deleting them. Disabled rules are saved but have no effect on the widget until you re-enable them.
This is especially useful when you want to:
- Temporarily pause a rule during website updates
- Prepare rules in advance and activate them later
- Test different configurations by toggling rules on and off
Rule Priority
When a visitor's page matches more than one rule, Knock Knock App uses rule priority to decide which one takes effect. Rules are applied in the order they appear in your list — the first matching rule wins.
You can reorder rules by dragging them up or down in the list. Place your most specific rules at the top and more general rules toward the bottom.
If you have overlapping rules, only the first matching rule will apply. Make sure your most important rules are positioned at the top of the list so they are not overridden by a broader rule below them.
Example Setup
Here is an example of how you might set up page rules for a typical website:
| Rule | URL Match | Heading | Video |
|---|---|---|---|
| 1 | Exact: /pricing | Questions about pricing? | Pricing walkthrough video |
| 2 | Exact: /demo | See it in action | Demo intro video |
| 3 | Contains: /blog/ | Enjoying the read? | General greeting video |
| 4 | Contains: / | Welcome! How can we help? | Default greeting video |
In this setup, a visitor on /pricing sees Rule 1. A visitor on /blog/my-post sees Rule 3. A visitor on any other page falls through to Rule 4.
Next Steps
To learn how to create and manage the greeting videos used in your page rules, see Video Greetings.