Add Trevilo to any website

Paste one line into your website's code on every page with a form. Your forms keep working as they do now, and each enquiry also comes to Trevilo.

Updated 18 Nov 2026

Trevilo works with the forms you already have. You add one line to your website, and when a visitor sends a form, a copy comes to Trevilo. Your visitors see no change, and your forms keep sending wherever they send today.

Copy your script

  1. In Trevilo, open Setup and go to Connect your website.

  2. Click Copy next to the script.

You can also find it later on the Websites page: click Open next to your website. The script looks like this, with your own Site ID:

<script src="https://trevilo.app/t.js" data-site="site_..." defer></script>

Not sure where to put it? In Setup, choose Send it to my developer and Trevilo emails your developer the script and instructions.

Add it to your website

  1. Open your website's code, or the place your website builder lets you add code to the page head.

  2. Paste the line just before the closing </head> tag on every page that has a form. If your site uses one shared header for all pages, paste it there once.

  3. Save and publish your website.

Check it is working

  1. Open a page on your website that has the script on it.

  2. In Trevilo, click Check this site in Setup, or Check my site on the Websites page. Trevilo looks for the script loading on your website.

  3. Send a real enquiry through your form and check it appears in Trevilo under Enquiries.

Which forms Trevilo captures

Trevilo picks up a form when the visitor sends it. It sends a form to Trevilo when:

  • the form has an email field, a phone field or a message box, and

  • the form is sent from your website's address, or another address you have allowed.

It leaves these alone:

  • login, sign-up, password, search, cart, checkout and payment forms

  • any form with a password or card number field

  • forms that send by the get method, such as most search boxes

  • a form your website refuses because a required field is missing or wrong

From each form, Trevilo never takes passwords, card details, hidden fields or uploaded files. It keeps up to 30 fields, and up to 500 characters from each.

What Trevilo cannot see

  • Forms inside an embedded frame. Many form services show their form inside a frame that belongs to their website, not yours. The script on your page cannot read it, so those enquiries do not reach Trevilo. To use Trevilo, the form needs to be part of your page.

  • Forms with no form element. Some forms are built entirely in JavaScript without a normal <form> element. These are not captured.

If you are unsure, add the script, send a test from your live website, and check it arrives under Enquiries.

Your website's addresses

Trevilo only accepts enquiries sent from your website's address, with or without www. If your forms also live on another address, such as a staging site or a second domain, add it on the Websites page: click Open next to your website and add it under Allowed addresses.

Stop one form being captured

If a form has an email or phone field but is not an enquiry, such as a newsletter sign-up, contact us and we will help you keep it out of Trevilo.

Content Security Policy

If your website sends a Content Security Policy, allow https://trevilo.app in script-src and connect-src.

Pausing a website

On the Websites page, click Open next to your website, then Pause website. While it is paused, Trevilo refuses its enquiries. Your form still works for your visitors.

Add Trevilo to any website | Trevilo help