Guides
Websites
List the sites an environment runs on, see which send data and block the rest.
Each environment keeps a list of the websites it runs on (Project → Websites). The list shows which sites actually send data, finds sites you forgot, and can block traffic from sites that shouldn't be there, such as a staging copy using the production key.
Patterns#
| Pattern | Matches |
|---|---|
shop.example.com | that host, on any port |
*.example.com | every subdomain, but not example.com itself |
localhost:3000 | that host and that port only |
Status and discovery#
The collector records the page origin of browser traffic (from the Origin header, else Referer). Each website shows its visitors and events over the last 30 days, and a status:
- Receiving data: events in the last 24 hours.
- Snippet loaded: no events in the last 24 hours, but the snippet downloaded its settings there. It's installed; events start once a visitor accepts cookies (when the snippet waits for consent) and enters a running test or reaches a goal. A personalization or a plain flag sends none.
- Quiet: seen before, nothing in the last 24 hours. Check that the snippet is still installed.
- No data yet: nothing has arrived from it.
For Snippet loaded, LiftCanary notes the page's origin and the time of each datafile download (at most every few minutes per site, up to 200 sites per environment): nothing about the visitor. Origins that send data or load the snippet but match no website appear under Not on your list, one click to add.
Blocking unlisted sites#
By default the list only monitors. Switch it to Block (admins only, with at least one website listed) and the collector answers 403 origin_not_allowed to browser batches from any other origin, so a copied snippet can't pollute your results.
API#
GET /v1/projects/web/environments/production/websites
PUT /v1/projects/web/environments/production/websites
{ "websites": ["shop.example.com", "*.example.com"], "mode": "enforce" }mode is monitor or enforce; both fields are optional. The response lists each website with its status, lastSeenAt, hits, users and matching origins, plus the discovered origins.