# A/B testing our demo request CTA, how do goals hook up to the form?

Asked by Erin Kavanagh on 2024-10-16. Tags: abm, experiments, lead-generation.

We launched a copy experiment on our demo request page last week, two CTA
variants, 50/50 split.

Expected: the results panel shows conversions as demo requests come in. Our CRM
has logged 31 demo requests since launch, so the form definitely works.

Actual: the experiment shows visitors for both variants but zero conversions on
the goal.

The experiment's goal is set to a "demo-requested" ID I typed in when creating
it. Do I need to wire something to the form itself? I assumed submissions would
be picked up automatically but clearly thats not the case.

## 1 answer

### Accepted answer from Isabel Torres (2024-10-16)

You found the gap: the Goal ID field does not create tracking, it references
an event that must already be tracked. Typing "demo-requested" into the
experiment config just tells Croct which event to count. Nothing on your site
fires that event yet, so the count stays at zero.

Hook it to the form submission handler. Two options:

```js
// Option 1: the purpose-built lead event
croct.track('leadGenerated');

// Option 2: a named goal matching your experiment config
croct.track('goalCompleted', {goalId: 'demo-requested'});
```

If you keep your current experiment config, use option 2 with the exact same
goal ID. Fire it on successful submission, not on button click, so abandoned
forms do not count.

One more expectation to set: after conversions start flowing, the experiment
stays "in progress" until each variant reaches at least 1000 visitors and 25
conversions, and at least a week has passed. So do not worry when a winner is
not called immediately after the fix.
