mirror of
https://github.com/hanzoai/insights.git
synced 2026-11-03 00:52:32 +00:00
The tree was a debranded snapshot of upstream taken around 2026-02-20, and upstream has moved about five months since. This replaces it with upstream master, mechanically re-derived: bin/debrand does the rename, and the pipeline and squashed migrations are restored from the shipped tree. Not a merge. The previous import replaced the tree wholesale in a single commit, so there is no shared content history to merge against. Reproducing the rename on the new tree is what actually converges. What survives: .hanzo/workflows, the Dockerfiles and bin/docker* entrypoints, compose files, LLM.md, and insights/migrations. The squashed initial migration is load-bearing — the live database records it by name, so upstream's ~918 individual migrations cannot come back. Nine products are dropped as unreferenced. Twenty-one more that we do not run are kept anyway because the core app still imports them; unpicking those is a refactor and does not belong in a rebase. This base does not build yet, and the reasons are not in the rename: upstream now wants Python 3.13.13 against our 3.12.12 and Django 5.2 against our 4.2, and the dependency manifests still name upstream packages that we republish under our own names. Those are decisions, not renames.
2.2 KiB
2.2 KiB
name, description
| name | description |
|---|---|
| check-insights-loading | Inspect how the Insights JavaScript SDK is loaded across a list of URLs. Use to confirm consistent installation across pages, find pages missing the snippet, detect mismatched API keys or hosts between pages, and verify the load method (head snippet vs deferred vs array.js). |
Check Insights loading
For each URL, navigates a real browser to the page, waits for Insights to initialize, and reports:
- Whether
window.insightsis defined and__loaded. - Which load method was used:
head_snippet,snippet,array_js_only, ornone. - Where in the document the snippet lives (
head/body). - The init config:
api_key,api_host,person_profiles. - Runtime state including the assigned
distinct_id.
When to use
- Sanity-check a fresh install — does the snippet actually load on every page?
- After a page-template change — did one page lose the snippet?
- When investigating split data — are some pages pointing at a different
api_hostorapi_keythan others? - Onboarding a new customer — confirm SDK is wired up before debugging events.
How to invoke
Call the check_insights_loading MCP tool with:
urls(required) — list of URLs to inspect.insights_host(defaulthttps://us.i.hanzo.ai).
Returns a structured summary with which URLs loaded successfully, which didn't, and the load-method distribution.
Interpreting the result
Look for these red flags:
- Empty
loadedlist, fullnot_loadedlist — snippet not present anywhere. Re-run install or check that the layout includes the snippet. - Mixed
loaded/not_loaded— snippet missing from some pages. Common cause: a page rendered by a different template or layout. - Multiple distinct
api_keyvalues across pages — a page is pointing at the wrong Insights project. - Multiple distinct
api_hostvalues — a page is pointing at the wrong ingestion endpoint (e.g. EU cloud vs US cloud, or vs a self-hosted reverse proxy). This causes events to land in different projects than expected. load_method: array_js_onlywith no init config —array.jswas loaded butinsights.init()was never called. Common with manual installs that miss the second half.