Reps & Conversion

    Installing a Rep and allowing your domains

    Copy the embed snippet, add the client domain to the allow-list, and fix "origin not allowed".

    ·3 min read

    Install

    1. Open Reps on the site (/sites/{site}/reps) and pick the Rep.
    2. Click Install and copy the snippet.
    3. Paste it on the site, reload the page — the Rep fades in once its theme loads.

    The two snippet shapes

    Which snippet you get depends on the Rep option you chose.

    Anchored — an anchor element plus the loader. The Rep renders exactly where the anchor sits, so paste it at the spot you want it:

    <div data-nds-widget="YOUR_REP_ID"></div>
    <script>(function(d,w){function l(){var s=d.createElement('script');s.async=true;
    s.src='https://nextdaysales.com/widget/embed.v1.js';s.onerror=function(){s.remove()};
    d.head.appendChild(s);setTimeout(function(){if(!w.__ndsEmbedLoaded)s.remove()},10000)}
    d.readyState==='complete'?l():w.addEventListener('load',l)})(document,window)</script>
    

    Used by: Ask Rep (inline, hero), every Capture Rep, and the anchored Answers Rep. The discreet nav icon is also anchored — you place it inside your nav markup, or tag an element you already have with data-nds-search.

    Script-only — one tag, pasted once anywhere on the page (typically just before </body>):

    <script>(function(d,w){function l(){var s=d.createElement('script');s.async=true;
    s.src='https://nextdaysales.com/widget/embed.v1.js';s.setAttribute('data-nds-widget','YOUR_REP_ID');
    s.onerror=function(){s.remove()};d.head.appendChild(s);
    setTimeout(function(){if(!w.__ndsEmbedLoaded)s.remove()},10000)}
    d.readyState==='complete'?l():w.addEventListener('load',l)})(document,window)</script>
    

    Used by: Ask Rep (chatbot, floating button, sticky bar, exit intent) and the auto-placed Answers Rep.

    Allowed domains

    Every Rep only runs on domains you list. Add each hostname the client actually serves — apex and www are separate entries, and staging domains need their own entry too.

    "Origin not allowed"

    That error means the page's hostname is not on the allow-list for that site. Add the exact hostname shown in the browser address bar under Site settings → Allowed domains, then hard-refresh. The dashboard preview is always allowed, so a Rep that works in preview but fails live is nearly always a missing domain.

    Performance

    The embed script preconnects to the answer endpoint and loads asynchronously, so it does not block page rendering. One loader handles any number of Reps on the same page.

    The Rep can never block or slow the page

    The snippet only starts fetching after the host page has finished loading, and it removes itself if nothing has loaded within 10 seconds. Every network call the Rep makes is bounded by an 8-second timeout.

    That means a visitor on a network that blocks us — some ISP router security products, an aggressive ad blocker, a corporate firewall — simply does not see the Rep. The page around it loads and behaves exactly as normal. Older snippets using <script async src=...> still work, but re-copying the snippet from the Install tab is worth doing: the older shape holds up the page's load event while the request is pending.

    Strict Content Security Policy

    If the client site sends a CSP header, allow our host in both directives:

    script-src  https://nextdaysales.com
    connect-src https://nextdaysales.com https://bybdetusavlxdetlqsrm.supabase.co