agentfaceLog in

Add agentface to your site

Agents leave when they can't get through. One line lets them finish. People see nothing new.

Pick how the site is published.
  1. Put this script last in the head of the layout every page uses.
    The script
    <script defer src="https://cdn.agentfacehq.com/s/SITE_KEY.js" data-api="https://cdn.agentfacehq.com/s/SITE_KEY.md"></script>
  2. Put this notice first in the body. People never see it.
    The notice
    <noscript>This site has an API that runs in its pages, in a browser. What each function returns: https://cdn.agentfacehq.com/s/SITE_KEY.md</noscript>
  3. Publish, then open the live homepage. The script is in the page source.
  1. Add a Custom HTML tag and paste this script.
    The script
    <script defer src="https://cdn.agentfacehq.com/s/SITE_KEY.js" data-api="https://cdn.agentfacehq.com/s/SITE_KEY.md"></script>
  2. Set the trigger to Initialization - All Pages, then Submit and Publish.
  3. Open the live homepage. The script is in the published container, not in the page source.
  1. In the project folder, run this. It writes the two lines.
    The command
    npx agentface init
  2. To open a pull request instead of writing the files, run this.
    The command
    npx agentface init --pr
  3. Publish, then run this. It reads the live homepage and says when the tag is there.
    The command
    npx agentface check

For your privacy notice: What the agentface snippet stores

For developers

What works on a complicated site

A page the server sends complete works. These are the other kinds of site.

Kind of siteSupportWhat to expect
The page changes its address without loading againWorksagentface stays on the page, and so do back and forward. What an agent does is counted on the address showing at that moment. A site that only changes the part after a hash keeps every count on the path before the hash. The text of the page still shows the full address, hash included.
A page behind a sign-inPartlyOn the page that is open, an agent sees what the signed-in visitor sees, including its forms. Opening a different address sends no sign-in, so a members-only page comes back as the signed-out page. Anything made for the site alone is still built with nobody signed in, so it is not made for members-only screens.
Several subdomains of one businessPartlyThe www address and the bare domain are one site, and what happens on either is counted for it. Any other subdomain, such as a shop, is its own site and is added on its own. A count is only for the site whose address it came from. A tag copied onto a different address is counted for nobody.
Pages filled in by scriptsPartlyOn the page that is open, text and forms added after it opened are included, and so is what a web component draws where the page can see it (an open shadow tree), including text placed into it. A search form drawn that way is found. A closed shadow tree is not read, because the page does not hand it over. A frame on the page is not read or filled from the outside. When that frame is itself a page of the site, it has its own tag for what is inside it. Opening a different address reads the HTML and does not run its scripts, so anything a script adds after that page opens is missing. An open shadow tree the HTML itself writes is still part of that read.
A strict content security policyWorksAdd https://cdn.agentfacehq.com to script-src, so the page can load the tag, and to connect-src, so what an agent does can be counted. If the policy names script-src-elem, change that rule instead of script-src. The command and the check read the policy on the live homepage and, when it blocks the tag, print the lines to change. Use those lines. A shorter version of this note can miss a stricter rule. The check then fails until those lines are published. Without connect-src, an agent can still use the open page and the browser drops the counts.
A policy with strict-dynamicWorksA policy with strict-dynamic ignores the hosts in its list. The tag runs when it carries the same nonce as the page's own scripts, or when a script that already has that nonce adds the tag. Without one of those, the tag does not run. connect-src is still needed for the counts. Running the command again keeps a nonce already on the tag.
Installed with Google Tag ManagerWorksA Custom HTML tag that holds the script line, set to run on every page, is enough once the container is published. On a strict-dynamic policy, give the Tag Manager code already on the page the page's nonce. The tag it then adds is allowed.

Works means that happens. Partly means it happens with the limit named here.

agentface

Your customers are starting to send AI agents. Make it easy for them to do business with you.

Talk to us

This page

  • Join the waiting list
  • Contact

For AI agents

  • index.md
  • sitemap.xml
  • robots.txt

© 2026 agentface

Privacy

Written for people, and for the agents they send.

agentface