Skip to content

Use with an AI agent

If you’re adding Silo to a site with a coding agent (Claude Code, Cursor, Codex, Copilot, whatever you use), paste this prompt into it. Swap in the write key your Silo contact gave you.

Prompt
Add Silo Analytics (@adpharm/silo-analytics) to this site. My write key is YOUR_WRITE_KEY.
Read the docs first: https://silo.docs.adpharm.digital/llms-full.txt
Silo wraps Segment's analytics-next, so if anything you remember about Segment disagrees with those docs, go with the docs.
1. Install it the way the Installation page says: from npm if this site has a build step, or with the CDN script tag if it doesn't. If the site already uses @segment/analytics-next, replace it and change the imports.
2. Set it up as in Quick Start, including the initial page view. If this is a single-page app, call analytics.page() on every client-side route change.
3. If the site has a cookie banner, connect it the way the Consent page shows. Whether Silo collects before the visitor chooses (opt-in or opt-out) is set for this write key on Silo's side, so you don't need to decide that.
4. To test locally, pass debug: true to load(), check the Network tab as Checking Your Events describes (or tell me what to look for), then take debug: true back out.
5. When you're done, tell me what you changed and what the Network tab showed.

The prompt sends the agent to a plain-text copy of these docs. It’s rebuilt from this site on every deploy, so it says the same thing these pages do: