> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cometly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# inspect_site

> Server-side fetch + analysis of a customer page, plus a real-browser pass when available — pixel installation, scripts, forms, iframes.

Crawls a URL on a connected domain and reports what's actually on the page: whether the Cometly pixel is installed (and matches THIS space's uid), every other ad/analytics/marketing script, forms (native + 3rd-party widgets like HubSpot / Typeform / Calendly), iframes, framework / page-builder fingerprints.

## When to use

* The user is troubleshooting tracking, attribution, conversion events, or forms.
* You want to ground recommendations in "what's actually on this landing page" rather than assumptions.
* During the Ask AI "Troubleshoot setup" guided flow.

## Limitations — important

By default this is a server-side HTTP fetch + static analysis. It can confirm a script TAG is on the page, NOT that the script actually fires.

When a browser renderer is configured for the environment, the final page is also loaded once in a real headless browser (within a 15-second budget) and the ad pixels that actually fired are merged into the report. This catches pixels a tag manager or consent tool injects, which never appear in the page source. It still can't see tags that wait for consent or a user action and never fire on load.

Pair with [`verify_pixel_events`](https://docs.cometly.com/mcp/tools/verify-pixel-events) to confirm events are actually arriving from real user traffic.

The diagnostic matrix:

* Pixel tag missing → install issue.
* Pixel tag present + 0 recent events → ad-blocker, CSP, wrong-uid, or page never visited.
* Pixel tag present + recent events → working.

## Domain scope

For safety, this tool only accepts URLs whose host matches one of THIS space's allowed domains. Off-domain URLs return `[authorization_error]` with the allowed domain list.

## Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `url` | string | Yes | Absolute HTTPS URL on one of the space's allowed domains. |

## Output

Structured JSON with top-level `http`, `is_html`, `detection`, `issues`, and `browser_scan` keys. Lead with the most decision-relevant facts in your response (pixel presence + uid match), then summarize the rest.

* `http` is the fetch result: `requested_url`, `final_url`, `status_code`, `ok`, `content_type`, `body_size_bytes`, and `truncated`.
* `is_html` is `false` when the response was not HTML or had an empty body. In that case `detection` is `null`, `browser_scan` is omitted, and `issues` only reports HTTP-level problems.
* `issues[]` entries are `{ level, message }`, where `level` is `error` or `info`. They flag problems such as a missing Cometly pixel or a pixel `uid` that does not match this space.
* `detection` holds `page` (`title`, `generator_meta`, `framework_hints`), `cometly_pixel`, `ad_pixels`, `analytics`, `tag_managers`, `crm_form_widgets`, `chat_widgets`, `forms`, `iframes`, `booking_links`, and `scan_method`. `booking_links` is always empty for this tool.
* `detection.scan_method` is `browser` when the browser pass ran, otherwise `static`.
* Each `detection.ad_pixels[]` entry has:
  * `platform`: `facebook`, `google`, `tiktok`, `linkedin`, `bing`, `x`, `reddit`, `pinterest`, `snapchat`, `quora`, `chatgpt`, or `null`.
  * `via`: `browser` when only the browser saw it, `both` when the page source and the browser did.
  * `matched_by`: why it was detected. Browser reasons are prefixed `browser:` (`browser:request`, `browser:global`, `browser:container`). When both saw the vendor, both reasons are listed, and the browser's pixel id fills in if the source had none.
* `detection.tag_managers` includes a `Google Tag Manager` entry with `matched_by: ["browser:container"]` when the page source showed no tag manager but the browser initialised one.
* `browser_scan` is only present when the page was HTML. It is `null` when no browser pass ran, otherwise `{ final_url, requests, elapsed_ms, error }`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.