Script Tag Installation

Add dat2ai to any website with one line of code.

1

Get Your Snippet

Log in to the dat2ai dashboard and navigate to your site. Copy the installation snippet from the Installation section.

2

Add to Your Website

Paste the snippet before the closing </body> tag:

<script async src="https://dat2ai.com/api/script/YOUR_SITE_KEY"></script>
3

Configure Tools Remotely

All tool configuration is done from the dashboard — no code changes needed on your site. Go to Sites → [Your Site] → Tools to define which forms are AI tools.

Alternative: NPM Package

For applications with a build step:

npm install dat2ai
import { Dat2AI } from 'dat2ai';

Dat2AI.init({
  siteKey: 'YOUR_SITE_KEY',
  apiEndpoint: 'https://dat2ai.com',
});

Troubleshooting

Script not loading?

Check that the snippet is placed before </body>, not inside <head>.

No events in dashboard?

Verify the site key matches the one in your dashboard.

Content Security Policy?

Add dat2ai.com to your CSP script-src directive.