How to identify website visitors with consent

Most website visitors leave without filling out a form, and you never learn who they were. The consent-first answer is to ask: visitors click Accept to be identified, and they come back as contacts your agent can read.

claude mcp add --transport http agentpixel https://agentpixel.io/mcp --header "X-AgentPixel-Source: guide_consent_first"

Why add it

Every result depends on visitors who click Accept, and not every visitor who clicks Accept can be matched to a contact.

Steps

1. **Connect your agent.** Add https://agentpixel.io/mcp to Claude Code, Cursor, VS Code or any MCP client. The command above is for Claude Code. 2. **Start the trial.** Ask: "Start an AgentPixel trial for me@company.com." The agent calls signup_free. Read it the 6-digit code from the AgentPixel email; it calls confirm_signup and gets the API key. 3. **Turn on the consent bar.** Ask: "Create a pixel for yoursite.com and configure consent with resolution." The agent calls create_pixel and configure_consent. Include resolution in purposes; without it no visitor is identified. 4. **Install the consent tag.** Put the tag returned by configure_consent on every page. Then ask the agent to call check_install. 5. **Read contacts.** Ask: "Show contacts since my last pull." The agent calls get_contacts with the saved cursor.

What the visitor sees

With the configure_consent snippet installed, visitors see a Cookie Permissions bar. Visitors click Accept to be identified. Each choice is recorded with the policy hash and the origin. Install only the configure_consent snippet; the snippet create_pixel returns before consent is configured is not the one to put on the site.

FAQ

**What happens when a visitor declines?** The consent bar records the decline with the policy hash and origin. Install only the configure_consent snippet so the consent bar is in place on every page.

**What is stored when a visitor accepts?** A receipt with the policy hash, the origin and the time. Changing the consent settings makes a new policy version, and returning visitors are asked again.

**Does this make my site compliant with privacy law?** AgentPixel asks first and keeps the receipt. Whether that meets the rules for your site is a question for your own counsel.

**What does it cost?** A 30-day trial, no card. Then $1 per account per month for 3 pixels and 500 new contacts per UTC calendar month. No usage charges.

**Can I see the output before signing up?** Yes. Ask the agent to call try_sample, or open https://agentpixel.io/v1/sample. Every record there is labeled synthetic.

**Where is the data policy?** https://allsourcedata.io/privacy

More: Connect AgentPixel and llms.txt.