For AI agents: the complete documentation index is available at https://docs.clickmax.io/en/llms.txt, the full documentation bundle is available at https://docs.clickmax.io/en/llms-full.txt, and this page is available as Markdown at https://docs.clickmax.io/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

    Use routing when your page is part of a Clickmax funnel and the next step depends on the rules configured in that 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, 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.