Create a custom goal

Updated

Track & measure custom conversion events for Analyze/Optimize on your site or external systems.

Custom goals let you track conversions beyond standard clicks or page views. Whether your conversions happen directly on your Webflow site or further downstream in an external system, custom goals help you measure what matters most to your business.

Types of custom goals

There are two types of custom goals, depending on where the conversion happens:

On-site conversions

Use on-site conversions when the conversion happens on your Webflow site. Examples include:

  • Form submissions from embedded third-party forms (e.g., HubSpot)
  • Bookings from meeting scheduling tools (e.g., Calendly)
  • Clicks on Webflow elements that aren’t standard buttons or links (e.g., Tabs or Sliders)

Off-site conversions

Use off-site conversions when the conversion happens outside your Webflow site. Examples include:

  • CRMs or other internal systems
  • Product signups, or other in-app events
  • Mobile app downloads

Note

Off-site conversion goals are only available on Enterprise plans.

Create a custom goal

Custom goals require additional configuration beyond creating the goal in the user interface, and will need support from your development team to configure. Without the correct configuration, no conversion data will be recorded.

Overview

Here’s an overview of what needs to happen:

  1. Create a custom goal
  2. Provide your developers with the appropriate documentation:
  3. Provide your developers with the following info:
    • On-site conversions: Event Name and Code Snippet
    • Off-site conversions: Event Name, Code Snippet, and Auth Token
  4. For On-site conversions, your developers will need to modify the Code Snippet before you can add it to your site
  5. Optionally, add the custom goal to optimizations
  6. Publish your site

Add a custom goal from the Goals page

Analyze and Optimize share the goals you create on the Goals page (if you have both add-ons). These goals are available to add to any Optimize optimization and are included in Analyze results. If you want to use the same success metric across multiple optimizations, create that goal on the Goals page so you can reuse it.

How to create a custom goal from the Goals page:

  1. Go to Insights tab > Goals
  2. Click Create goal > Need something different? Create a custom goal
  3. Enter a Goal name
  4. Click Next
  5. Enterprise customers can select On-site conversion or Off-site conversion and click Next
  6. Enter the Event Name (e.g., form_submitted) and click Next
    • This event name will be used in the APIs your developers will later configure
    • The event name must be 40 characters or fewer, and can’t contain spaces
  7. Click Copy code and provide the Code Snippet to your developers so they can modify it
  8. Click Save

Add a custom goal from the Optimizations dropdown

These goals are exclusive to Optimize and are tied to the optimization you create them in — i.e., you can't add these goals in another optimization.

Important

You can only add or edit a goal to a traditional test optimization while it's in a draft or off state

While editing an optimization:

  1. Click the Optimizations dropdown in the context bar
  2. Click Settings & goals > Add icon > Create custom goal
  3. Enter a Goal name
  4. Click Next
  5. Enterprise customers can select On-site conversion or Off-site conversion and click Next
  6. Enter the Event Name (e.g., form_submitted) and click Next
    • This event name will be used in the APIs your developers will later configure
    • The event name must be 40 characters or fewer, and can’t contain spaces
  7. Click Copy code and provide the Code Snippet to your developers so they can modify it
  8. Click Save

Add the code snippet to your site or Google Tag Manager

Before you get started

These steps are only necessary if your goal targets on-site conversion events (i.e., not off-site conversions).

For the custom goal to record on-site conversion events, the code snippet must be added to your site. Team members with the site manager or designer role can add this code to your site directly.

On-site conversion events that occur on a specific page

If the conversion is page-specific, add the code snippet to the custom code section of the page’s settings before the </body> tag:

  1. Go to Page settings > Custom code
  2. Add your custom code in the Before </body> tag section
  3. Click Save changes

On-site conversion events that span multiple pages

If the conversion can occur on any page across your site, add the code snippet to the footer code in Site settings:

  1. Go to Site settings > Custom code
  2. Add your custom code in the Footer code section
  3. Click Save changes

Good to know

If you use Google Tag Manager (GTM) and already have a trigger set up for an action you want to track, you can add the code snippet to a custom HTML tag and attach it to an existing GTM trigger.

Add the goal to optimizations

For Optimize, you can add the goal to one or more optimizations so that the conversions are attributed to the variations that the visitor originally viewed before converting.

Learn how to add a Goals page goal to an optimization.

Publish your site

For the goal to go live, you must publish your site.

Important

Compliance considerations — Your organization is responsible for ensuring your use of custom goals complies with applicable privacy and data protection laws (such as GDPR, CCPA, and other regional regulations). This includes:

  • Obtaining appropriate consent from visitors before tracking conversions
  • Providing clear disclosures in your privacy policy about data collection
  • Ensuring your data handling practices meet legal requirements

We recommend consulting with your legal and privacy teams to assess your specific obligations before implementing custom goal tracking.