URL Patterns

URL patterns determine which pages a placement is active on. Inlay uses glob-style matching — familiar if you've used .gitignore or shell wildcards.

Syntax

Patterns are matched against the full page URL including the protocol, hostname, path, and query string. Two wildcard characters are supported:

CharacterMatchesExample
*Any sequence of characters except /https://example.com/blog/* — matches all direct children of /blog/
**Any sequence of characters including /https://example.com/docs/** — matches all pages under /docs/ at any depth

Examples

text
# Match all pages on the site
https://example.com/**

# Match all blog posts (direct children only)
https://example.com/blog/*

# Match all pages under /docs/ at any depth
https://example.com/docs/**

# Match a specific category page
https://example.com/category/technology

# Match product pages with any slug
https://example.com/products/*/overview

# Match pages with query strings (the * matches the query value)
https://example.com/search?q=*

Matching rules

Case sensitivity

Matching is case-sensitive. https://example.com/Blog/* does not match https://example.com/blog/my-post. Use lowercase patterns unless your URLs are deliberately mixed-case.

Trailing slashes

Inlay normalises trailing slashes before matching. Both https://example.com/blog/ and https://example.com/blog match a pattern of https://example.com/blog.

Anchoring

Patterns are anchored at both ends by default. A pattern of https://example.com/blog/* does not match https://example.com/blog/posts/nested — use ** for deep matching.

Overly broad patterns

A pattern of https://example.com/**will match every page, including your checkout, login, and user profile pages. Narrow your patterns to content-heavy pages where ads add value and won't disrupt critical user flows.

Multiple patterns per placement

A placement can have more than one URL pattern. A page matches the placement if it satisfies any one of the patterns (logical OR). This is useful when your content lives under multiple path prefixes:

text
# Show ads on both blog posts and tutorials
https://example.com/blog/**
https://example.com/tutorials/**

Enter each pattern on a separate line in the placement form.

Testing your patterns

The easiest way to test is to install the embed script on a staging environment and visit the pages you expect to match. Open your browser's Network tab and look for a POST /api/serve/[siteScriptId] request. If the response is { "available": false } and no request was sent at all, the page URL did not match any placement pattern.

You can verify matching in JavaScript by checking window.__inlay_matched in the console — the embed script sets this to true when a placement match is found.