Form Submissions

The Problem

Form submission services are expensive! I challenge you to understand Netlify’s form submission pricing. Instead, keep your form submissions in the same dashboard as the rest of your analytics for a fraction of the cost.

The Solution

Use 99Dev’s Custom Events to track your form submissions and capture all of the fields.

contact-us.ts
// Include the 99Dev event function
import { recordEvent } from "@99devco/analytics"

// When your form is submitted, record the results
const myForm = document.getElementById("MyForm");
myForm.addEventListener("submit", function (event) {
  event.preventDefault()

  // Build a JSON object of the form values
  const form = event.currentTarget as HTMLFormElement
  const formData = new FormData(form)
  const submission = Object.fromEntries(formData.entries())

  // Send the results to 99Dev
  recordEvent("Submitted Contact Form", submission)
})

The Result

Custom Events are displayed on the 99Dev Dashboard App in a table near the bottom of the page.

Custom Event Screenshot
Previous
Dynamic URLs
Next
nil