Custom Analytics

Start of documentation content

Formally includes anonymised analytics that attempts to respect privacy. The person designing the form has to opt-in to these analytics, it's not enabled by default. The specific details are in our privacy policy.

By writing a small adaptor you can wire up Formally to your own Analytics API. This does not allow you to track additional features, just to dispatch them to a different service. This may allow greater data sovereignty.

Use of onAnalytics

You can override the default analytics handler

import { Formally } from 'formally';

  onAnalytics={({ sessionId, eventType, formId, formVersionId }) => {
    // send anonymous statistics to your own analytics service
    // nothing needs to be returned from this function