Following the A/B testing guide on the Strapi blog, stuck on the goal step
Hello, I am working step by step through the guide about running A/B tests with Strapi on the Strapi blog.
Everything worked until the experiment setup. The guide says to select a primary goal for the experiment, and in my dashboard the goal dropdown is there but my goal is not in it. I created the CTA variant, mapped the slot, all previous steps check out.
I wanted to use a goal called "signup-clicked" but the dropdown does not show it. Do I need to create the goal somewhere first? I could not find a create goal button anywhere
1 answer
There is no separate "create goal" screen, which is the part that trips people up. The experiment's primary goal has to reference an event that is already being tracked, so the dropdown only lists goal IDs Croct has actually received.
Fire the event once from your app and it becomes selectable:
croct.track('goalCompleted', {goalId: 'signup-clicked'});Wire that to your signup button click, trigger it yourself once in a browser, and then reload the experiment editor. The goal should appear in the dropdown after the event lands.
That guide is solid by the way, it is a guest post by Croct's founder Juliana Amorim on Strapi's own blog, so the steps match the real product. It just assumes the goal event is already instrumented by the time you reach the experiment section.
Added the track call, clicked the button once, and "signup-clicked" showed up in the dropdown exactly like you said. Continuing with the guide now, thank you!