Pick your stack and add the code below to your codebase.

Install this script in the <head> tag of your website:

<script>
  const script = document.createElement('script');
  const writeKey = '<YOUR_WRITE_KEY>';

  script.src = 'https://unpkg.com/@formo/analytics';
  script.onload = function () {
    FormoAnalytics.init(writeKey)
      .then((formo) => {
        window.formo = formo;
      })
      .catch((error) => {
        console.error('Error initializing FormoAnalytics:', error);
      });
  };
  document.head.appendChild(script);
</script>

Ensure you pass a valid writeKey when initializing the SDK. Replace <YOUR_WRITE_KEY> with your project’s Write Key in your project settings. The write key is a unique identifier for your project. Formo uses this key to send events from a source to the correct destination.

To test that things are working, navigate to your site and open the network tab of the developer tools in your browser (usually F12 or Ctrl/Command + Shift + I). Search for ‘events’ and make sure you get a 200 response code in the status column.

SDK API Reference

Refer to the corresponding SDK documentation for the implementation specifics:

Code Examples

Check out working examples of Formo on Github:

Support & Feedback