How to identify website visitors with consent

Ask first. The snippet from configure_consent shows a consent bar that asks each visitor to "identify this visit," and each acceptance is stored as a receipt your agent can read.

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

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, a bar asks the visitor to "identify this visit." The choice is recorded, and each acceptance is stored 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.