File DA-013 View as Markdown

Webflow

This page adds Double Agent to a Webflow site through its custom code settings. It takes a few minutes and no code editing.

Before you start: custom code needs a paid Site plan, or a Core, Growth, Agency or Freelancer Workspace plan.

Add the snippet

  1. Open Site settings and the Custom code tab.
  2. Paste these two lines into Head code, before any other scripts there, and click Save changes:
<script>window.doubleagent=window.doubleagent||{q:[],push(){this.q.push(arguments)}};</script>
<script async src="https://cdn.doubleagent.so/v1/doubleagent.js" data-profile="auto"></script>
  1. Click Publish. Saving alone doesn't put it live.

Add it once here, not again in each page's settings.

Check it worked

Once published, run:

npx @doubleagent-so/cli verify https://your-site.example

It should end with Installed correctly. You can also open the browser console on the live site and run await doubleagent.ready() to see a verdict.

Optional: a token on your form

If a form sends to your own server (a custom form action), you can add a signed token to it. Your server then checks the da_token field (verify tokens on your server). This needs your public key in the snippet (data-key="pk_live_…", see Capabilities). Add this to Footer code:

<script>document.addEventListener('DOMContentLoaded', function () { doubleagent.push('protect', 'form', 'lead_form'); });</script>

'form' is a CSS selector for the first form on the page; use a more exact one if you have several.

Next: claim your domain to see your visitors.