For AI agents: the complete documentation index is available at https://docs.clickmax.dev/en/llms.txt, the full documentation bundle is available at https://docs.clickmax.dev/en/llms-full.txt, and this page is available as Markdown at https://docs.clickmax.dev/en/reference/browser-sdk/routing.md.
  • English
  • Routing

    Browser SDK routing decides where the visitor should go after a meaningful interaction on the page.

    When to use it

    This routing applies to classic editor pages and external pages integrated with the Browser SDK when the next step depends on the funnel's rules.

    Max Design pages do not navigate through funnel arrows. Destinations belong to the site's code: links, button actions and, after capture, data-cx-redirect-url. Without an explicit destination, submitting a form does not advance to another node. CTA markers record events but do not set the destination. See how to use Max Design pages in a funnel.

    What routing takes into account

    The SDK can decide navigation from events such as:

    • button_click
    • link_click
    • scroll
    • form_submit
    • contact_captured

    How the redirect is decided

    For forms on classic editor and external pages, the public order of precedence is:

    1. data-cx-redirect-url
    2. hints from form_submit:<formId>
    3. hints from contact_captured:<formId>
    4. the global contact_captured hint
    5. nextUrl
    6. the legacy redirect_link from .cm-form

    Redirect with the lead's data

    When there is a redirect after a form submission, the SDK can forward:

    • name
    • email
    • phone
    • utm_source
    • utm_medium
    • utm_campaign
    • utm_content
    • utm_term

    What you do not have to configure by hand

    You do not need to write JavaScript to:

    • read the next step of the funnel
    • decide the next step after a successful submission
    • rebuild the query string with the lead's data

    The SDK takes care of those decisions, as long as the page is connected to a funnel configured in Clickmax.