Skip to main content

Route Registrants to Different Confirmation Pages Based on Their Form Answer

Send registrants to different confirmation/landing pages based on how they answered a dropdown question on your registration form, using a small self-hosted router page.

Want to send each registrant to a different thank-you page depending on how they answered a question on your registration form? For example, send beginners to one welcome page and seasoned pros to another. This tutorial shows you how.

This is a self-hosted JavaScript technique. AEvent has no native "branch on answer" setting, so we use a tiny redirect page on your own website to do the routing. Do not worry: every line of code you need is provided below, ready to copy and paste.

Before you start

This tutorial assumes you already know how to do two things. If you do not, read these first:

  • Add a custom field to your registration form: see article 4005149.

  • Set your campaign's Confirmation Page: see article 8352962.

Related reading: "Dynamic Confirmation Page URL" (article 4490175) covers an older, more complex version of this idea. You do not need it for this method.


Part 1: Create the dropdown question

Creating the dropdown happens in two places. First you declare the custom field in Registration, then you turn that field into a dropdown in the Form Builder and add your answer options.

Step 1.1: Add the custom field. Go to your campaign, open Registration, and click Add Registration Field in the top right. In the panel that opens, enter a Field Name (we will use routeval) and pick a Form Type, then click Add.

The field name matters. Whatever you name this field becomes the merge token AEvent uses to pass the answer along later. A field named routeval becomes the token {{!subscriber-routeval!}}. (The rule is always {{!subscriber-FIELDNAME!}}.)

AEvent Add Registration Field panel with the field name routeval entered

Step 1.2: Turn the field into a dropdown in the Form Builder. Still under Registration, open your form to launch the Form Builder. In the Modules panel on the right, add a Select module (this is the dropdown), and set its field name to match the field you just created (routeval). The label and value can be different.

AEvent Form Builder showing the Select module in the Modules panel, used to make the routeval field a dropdown

In the Select module, add each answer as an option with a label and a value. Each option has two parts:

  • A label: the words the registrant reads on screen.

  • A value: the short code that actually gets passed to your router page.

The label and the value can be different. Here is the example we will use throughout this tutorial:

Visible answer (label)

Value passed

I'm just getting started

beginner

I run webinars occasionally

intermediate

I'm a seasoned pro

advanced

In the option editor you can add a row, remove a row, and type into the label field and the value field separately. The question label itself ("Which best describes you?") is what registrants see above the dropdown.

Tip on values: the value column is the part that gets passed to your router, so keep values short and consistent (no spaces, all lowercase is easiest). The label can be as friendly and wordy as you like, because registrants only ever see the label. If you want, the label and value can be identical: that is perfectly fine.


Part 2: Point your confirmation page at the router

Now tell AEvent to send registrants to your router page after they sign up, and to carry their answer along in the link.

You will find this setting under Campaign, then Advanced, then Page URLs, in the Confirmation Page field. (You may need to click Edit first.) In that Confirmation Page field, choose the external URL option and enter your router page address with the merge token attached, like this:

https://yoursite.com/router?value={{!subscriber-routeval!}}

When someone registers, AEvent fills in {{!subscriber-routeval!}} with that person's answer value and sends them to the finished link. So a beginner gets sent to https://yoursite.com/router?value=beginner automatically.

AEvent campaign Advanced settings, Page URLs section, Confirmation Page field with Edit

Good to know: AEvent also adds a couple of extra items to the end of the link automatically (the registrant ID and the webinar ID). Your router script ignores these, so you do not need to do anything about them.


Part 3: Build the router page

The router is a blank page on your own website (or in any page builder) whose only job is to read the answer and forward the registrant to the right place. Registrants never really "see" this page: it redirects them in a split second.

Step 3.1: Create a new, blank page on your site at the address you used in Part 2 (in our example, /router).

Step 3.2: Paste this script into that page (most page builders have a "custom code" or "HTML embed" block for this):

<script>
// 1. Read the answer value AEvent passed in the URL (?value=...)
var params = new URLSearchParams(window.location.search);
var answer = params.get('value');

// 2. Match each answer value to its destination page.
// These keys MUST exactly match the "value" you set on each dropdown option (case-sensitive).
var destinations = {
"beginner": "https://yoursite.com/welcome-beginner",
"intermediate": "https://yoursite.com/welcome-intermediate",
"advanced": "https://yoursite.com/welcome-pro"
};

// 3. Pick the matching page, or fall back to a default if the answer is blank or unrecognized.
var target = destinations[answer] || "https://yoursite.com/welcome";

// 4. Send the registrant on their way.
window.location.replace(target);
</script>

Step 3.3: Edit two things only.

  • The destinations list: replace each key ("beginner", "intermediate", "advanced") so it exactly matches the option values you set in Part 1, and replace each web address with the real page you want that group to land on.

  • The fallback address on the line that ends with || "https://yoursite.com/welcome": change this to the page anyone should see if their answer is blank or does not match a key.

Important: the keys in the destinations list must match your dropdown values exactly, including upper and lower case. A value of beginner will not match a key of Beginner. Keep them identical.


Frequently asked questions

What happens if the answer is blank or does not match any of my keys?
The registrant goes to the fallback page (the address after || in the script). Always set this to a sensible general welcome page so no one ever hits a dead end.

Does the matching care about upper and lower case?
Yes. The values are passed along exactly as you typed them, with no changes. So advanced and Advanced are treated as two different answers. Keep your dropdown values and your script keys identical.

Is there a limit to how many questions I can add?
A campaign can have up to 10 custom registration fields.

It is not redirecting. What should I check?

  • Confirm the value passed in the link exactly matches a key in your destinations list (watch the case).

  • Confirm your router page is published and live at the address you put in the confirmation URL.

  • Confirm the confirmation URL still contains the token {{!subscriber-routeval!}} (using your real field name).

Can my labels and values be the same?
Yes. If you do not need a friendly label that differs from the code, just set the label and value to the same text.


⚙ Notes for automation / AI assistants

Implementation details that matter when configuring this programmatically:

  • The per-registrant token is literally {{!subscriber-FIELDNAME!}} (field name maps 1:1 to the token suffix). It does not appear in the merge-field picker; type it manually.

  • When setting the confirmation URL through the API rather than the UI, the curly braces must be percent-encoded (the opening brace as percent7B and the closing brace as percent7D), because the API rejects raw braces. In the UI, type the braces normally.

  • On registration, AEvent substitutes the token server-side and issues an HTTP 302 redirect to the resulting URL.

  • The selected value is forwarded verbatim: exact case, no normalization. Router keys are case-sensitive.

  • AEvent auto-appends &r=REGISTRANTID and &webinar=WEBINARID to the confirmation redirect. The router must tolerate (or may use) these extra params.

  • There is no server-side validation of the answer against the option list. The dropdown UI is the only constraint; the backend forwards whatever is posted. Always keep a fallback in the router.

  • The router page needs no AEvent header script and no merge token of its own. The value arrives already-substituted in its own query string, so vanilla URLSearchParams.get('value') is all that is required. This is simpler than the older article 4490175 pattern (hidden ae_confirm div with jQuery polling); do not copy that approach.

Did this answer your question?