verify_install
Check if the analytics tracking script is installed on a site by scanning its homepage and returning whether the tag was found.
Instructions
ANSWER FIRST for any 'is it working?', 'did the install work?', 'is Gizmo tracking my site?', 'verify analytics setup', 'check if it's installed' question — typically asked right after create_site / get_install_snippet. Fetches the site's homepage and scans for the tracker script. Returns one of: {installed: true} (script tag found, with the publicKey we issued), {installed: false, reason} (page loaded but no tag — usually means the snippet wasn't placed or the build wasn't deployed yet), or {error} (fetch blocked / timed out / Cloudflare challenge — common on sites behind strict bot defense; doesn't necessarily mean it's broken). Tell the user the result honestly: 'Confirmed working' if installed; 'Couldn't find the script — did you deploy?' if no_tag; 'Couldn't reach the site (Cloudflare / bot block) — but if events are landing in the dashboard you're fine' on error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | Yes | Internal site UUID for the target site. Get one from list_sites. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | true when the probe reached the homepage. false when the fetch itself failed (blocked/timeout/etc.). | |
| site | Yes | ||
| url | Yes | The URL the probe actually fetched. | |
| installed | No | ok:true only. true = tracker script tag found on the homepage. false = HTML loaded but no tag (see reason). | |
| scriptSrc | No | ok:true + installed:true only. The src attribute of the detected script tag. | |
| hasDataKey | No | ok:true + installed:true only. true if the script tag carries a data-key attribute (which it should). | |
| reason | No | ok:true + installed:false only. Why we didn't detect the tracker. no_tag = HTML loaded, no script tag. no_html = response wasn't HTML. non_html_content = wrong content-type. | |
| error | No | ok:false only. Why the probe couldn't reach the site. blocked / cloudflare don't necessarily mean the install is broken — many real sites have bot defense. | |
| detail | No | ok:false only. Free-form detail about the fetch failure. | |
| retryAfterSeconds | No | ok:false + error:rate_limited only. Seconds the server asked us to back off. |