Skip to Content
Pageflock

Install with a coding agent

Paste one prompt into Claude Code, Cursor or another coding agent, and it installs Pageflock the way your framework needs.

A coding agent that knows your codebase can install Pageflock for you. The dashboard's install screen opens on the Coding agent tab, with a prompt that carries your site's ID. Copy it into Claude Code, Cursor, Codex, Windsurf or any other coding agent.

The prompt looks like this:

Prompt
Add Pageflock analytics to this project (example.com). Site ID: SITE_ID

- With a JavaScript build: install @pageflock/analytics and set it up for this framework as its README shows (node_modules/@pageflock/analytics/README.md), with site "SITE_ID".
- Without one (plain HTML, a CMS): add this to the <head> of every page:
  <script defer src="https://e.pageflock.com/s.js" data-site="SITE_ID"></script>

Pageflock is cookieless, so no consent banner is needed. Run the build when you are done.

The prompt points the agent at the README inside the installed package, so it follows the instructions for the version it installed. Every page of these docs is also available as Markdown for agents: add .md to the URL, or read /llms.txt for the index.

From an AI assistant

With the MCP server connected, an assistant can do the setup itself: create the site with create_site, fetch the code with get_install_instructions (it takes the framework), and confirm it works with verify_installation after you deploy. The install_pageflock prompt runs those steps in order.

Options in the prompt

Choose Also outbound links, downloads and 404s on the install screen and the prompt asks for autoEvents. On a self-hosted instance, the prompt also carries your own collect endpoint, so the agent sets endpoint for you.

On this page