Tracking Sign-Up Form Conversions

If you run ads on Google or Facebook, you know how important it is to target the right audience. Both platforms let you optimise your target groups by tracking which ads actually led to a purchase of your service — Google provides a Tracking Tag for this and Facebook provides FB Pixel.

The ActiveNow sign-up form supports conversion tracking with both tools. We strongly encourage using them, as they can reduce ad spend while increasing new sign-ups.

What events does the form send?

The ActiveNow form uses window.postMessage() to send information about actions taken within the form. The function is called with a name that describes what happened:

  • activenowDetailsLoaded — sent after the client selects the classes they are interested in. Equivalent to Add to cart in eCommerce (e.g. Facebook – Add to cart).

  • activenowFormSubmitted — sent after all required fields are filled in and the sign-up is submitted. Equivalent to placing an order in eCommerce (e.g. Facebook – Submit application).

Receiving form events

To receive the events sent by the form, use window.addEventListener("message") and check the type of message received. Example JavaScript:

window.addEventListener("message", messageReceived, false);

function messageReceived(e)
{
    if ( e.data == 'activenowDetailsLoaded' ) {
        // Call the relevant Facebook or Google event here
    }
    if ( e.data == 'activenowFormSubmitted' ) {
        // Call the relevant Facebook or Google event here
    }
}

Sending events to Google / Facebook

In the places marked Call the relevant Facebook or Google event here, insert the appropriate Tracking Tag or FB Pixel code. For more information:

The ActiveNow team is not able to assist with the technical implementation of this feature on your website.

Last updated

Was this helpful?