Setting Up the Website Distribution with Trigger Conditions

Updated 

This feature enables you to create and manage website surveys with seamless integration through LiveChat. It offers a flexible setup, allowing surveys to be triggered based on specific conditions, making it easy to gather real-time feedback from website visitors. Additionally, it supports performance analysis across different creative formats, languages, and devices, providing actionable insights to improve user engagement and survey effectiveness.

Please refer to the Website Distribution article for examples of use cases and additional benefits.

Prerequisites

In order to access the Website Distribution, you must have the following View and Edit Distribution permissions at the Survey Level.

Setting Up Website Distribution with Trigger Conditions

  1. Navigate to the Distribution sections.

  2. Click Create Distribution and select Website distribution.

  3. Go to Details page and fill in the details:

    1. Distribution Name: Enter a meaningful name.

    2. Expiration Date: Select an expiration date.

    3. Live Chat Application: You can either select an existing Live Chat or create a new one (proactive prompts associated with Live Chat will also appear in the dropdown). If an existing Live Chat is selected, the user can view other surveys linked to that Live Chat.

      For creating a new Live Chat application follow these steps, click Create New and go to New Live Chat Application page:

      1. Name: Please provide a meaningful name for the Live Chat.

        Note: The live chat name is not editable later.

      2. Website URL: To operate the web application on particular websites, choose them from the list. If no websites are selected, it will function on all sites where the code is integrated.

        Note: Choosing a live chat application here does not display a live chat on the website; it merely links the proactive prompts to the necessary code for embedding the survey on the site where responses will be gathered.

  4. Go to Intercept Setup and fill in the details to select creative and triggers.

    Specify Display Events: Select when the creative should be displayed to visitors:

    • Page Load: Display the creative immediately after the page has fully loaded.
    • Page View: Display the creative when a visitor navigates to a new page during the same session.
    • Exit Intent: Display the creative when visitor behavior indicates they are about to leave the page, such as moving the cursor toward the browser's close or back controls.

    1. Go to Select Creative section and select a creative.

      Access the Creative section. You can then either develop a new creative or select one from the existing options.

    2. Go to Select Trigger section and define the trigger condition for the creative to display. Fill the details as below:

      1. Trigger Type: The default trigger type is Condition Based.

      2. Trigger Condition: You can specify the criteria and select the values. Choose the field, operator, and value; you also have the option to add more conditions.

        Trigger conditions for which support exists:

        Category

        Name

        Description

        User browsing info

        Region

        Enables prompts based on region

        User browsing info

        Screen resolution height

        Enables prompts based on pixel height of screen 

        User browsing info

        Browser 

        Enables prompts based on browser and version 

        User browsing info

        Device type 

        Enables prompt based on Mobile / Desktop 

        User browsing info

        IP address 

        Enables prompts for users based on certain criteria (inclusion, exclusion, regex) of their IP address.  

        User browsing info

        User Agent 

        Enables prompts based on browser or OS  

         

        User browsing info

        Screen resolution width

        Enables prompts based on pixel width of screen 

        User browsing info

        Country

        Enables prompts based on country

        User browsing info

        City

        Enables prompts based on city

        Browsing session

        Time Spent on Page Load 

        Enables the prompts based on the amount of time user has been on the page since the page was loaded. When page refreshes, timer restarts 

        Browsing session

        Unique session count 

         

        Browsing session

        Page views in current session

         

        Browsing session

        Page Referrer 

        Enables the prompts based on previous page visit history of user 

        Browsing session

        Time Spent with in session 

        Enables the prompts based on time spent by the user on the site 

        Browsing session

        Vertical Page Scroll Depth 

        Enables the prompts based on the % or no. of pixels user has scrolled on a web page. 

        Browsing session

        Total page views across sessions

         

        Browsing session

        Trigger state

         

        Browsing session

        Horizontal Page Scroll Depth 

        Enables the prompts based on the % or no. of pixels user has scrolled on a web page. 

        Browsing session

        Current URL  

        Enables prompts based on current URL of page 

        Survey

        Survey Seen 

        Enables the prompt when a survey is seen. 

        Survey

        Survey Completed 

        Enables the prompt when a survey is completed. 

        Intercept

        Self- Distribution Closed 

        Enables prompts based on whether the same distribution is closed earlier 

        Intercept

        Self- Distribution Completed 

        Enables prompts based on whether the same distribution is completed earlier 

        Intercept

        Self-Distribution Triggered 

        Enables prompts based on whether the same distribution is triggered earlier 

        Intercept

        Self- Distribution Engaged 

        Enables prompts based on whether the same distribution is engaged earlier 

        External API

         

         

        Profile custom field

         

         

    3. You can click + Add Condition and + Add Condition Group to define additional conditions and condition group and click Next.

      1. Profile Custom Fields as Conditions: You can now use profile custom fields (passed via the SDK or authentication) as intercept condition triggers. For example, target a survey only to visitors whose customerTier equals "Enterprise."

  5. Please navigate to the Translation page to set up the Translation Conditions. To enhance the end-user experience for Website Surveys, translations will primarily be determined by the browser's preferred language. Should the system be unable to detect the browser's preferred language, the content will then be delivered in the base language.

  6. Navigate to Scheduling page and fill in the details:

    1. Navigate to the Intercept Activation Details section and then configure the start date, time, and end date.

      1. Start Date and Time: Select a start date and time

      2. End Date: Specify a termination date for the distribution.

      3. Business Hours: Indicate the precise business hours for the survey's distribution.

      4. Timezone: Select specific timezone.

    2. Navigate to Distribution Sampling section where you can define the sampling for the distribution on a scale of 100. Toggle Enable Distribution Sampling and specify the Distribution Sampling Rate, which determines the percentage of all eligible recipients who will be included in this distribution. The sampling is always randomized.

    3. Access the Distribution Tagging section to assign values to custom fields for responses. These values will then be linked to every response originating from this distribution.

    4. Click Save.

  7. Once you click save you will be redirected to a pop-up window with the embed code with option to copy snippet.

    Note: Similar pop up to be supported when user selects embed code from the 3 dots in Distribution Record Manager for a website distribution.

How to use it?

  • Save and Deploy:

    • Save the distribution and duplicate the LiveChat code.

    • Embed the code into the HTML of the target website to trigger surveys.

      Note: Only one LiveChat code can be embedded per website.

  • Analyze Distribution Report: Once the surveys have been distributed, you can examine the metrics for the distribution created. By choosing "Distribution Report" from the kebab menu next to the specified Distribution, you can view essential metrics along with the embed code as outlined below:

    Key Metrics

    • Survey Started Count

    • Survey Response Count

    • Survey Completion Rate

    • Survey Abandonment Rate

    • Survey Engagement Rate

    • Creative Triggered Count

  • To test a website distribution, start by copying the LiveChat ID from the embed code. Then, use the test link .

    Make sure to replace the App ID and environment values in your distribution settings to match those used in the test link. This ensures accurate testing and integration with your website.

Key points to note

Single LiveChat Code Per Website: Only one LiveChat code can be embedded on a website at a time, so it's important to manage multiple survey distributions carefully to avoid conflicts and ensure proper functionality.

Adding embed code within the website

After creating a website distribution, click Vertical Ellipsis menu and select "Copy Embed Code." Then, paste the embed code into your website's HTML to begin triggering surveys for visitors.

Load Time Handling

To provide a smooth experience while your survey loads after a visitor interacts with a creative, a temporary loading screen is displayed

  1. If the survey loads in under 2 seconds, visitors see a single message:

    "Getting your feedback survey ready."

  2. If the survey takes longer than 2 seconds to load, visitors see the following messages rotate every second until the survey is ready:

    1. Getting your feedback survey ready.

    2. Preparing a few quick questions.

    3. Almost there.

Performance target: Your surveys are designed to load within 500 milliseconds for 99% of requests.

Note:

  • Visitors see the loading screen using the default theme with a white background.

  • You cannot currently customize the loading screen theme or messages. Support for theming and customization will be available in a future release.

  • Loading messages are automatically translated based on the visitor's browser locale.

Analyse Distribution Report

After surveys are distributed, view metrics for each distribution by selecting Distribution Report from the ⋮ menu on the distribution row.

Metric

Description

Survey Started Count

Number of times visitors started the survey.

Survey Response Count

Number of completed survey responses received.

Survey Completion Rate

Percentage of started surveys that were completed.

Survey Abandonment Rate

Percentage of started surveys that were abandoned.

Survey Engagement Rate

Percentage of visitors who engaged with the survey creative.

Creative Triggered Count

Number of times the creative was displayed to visitors.

Utilize the Distribution Report to track the performance of your survey distributions over time. Accessible from the ⋮ menu → Distribution Report, it offers consolidated performance metrics, trend visualizations, and analyses by creative type, language, and device, assisting you in recognizing engagement patterns and assessing the effectiveness of your distribution efforts.

To answer specific business questions, you can create tailored reports using Custom Reporting. Apply filters such as date range, distribution, creative type, and device, choose the dimensions and measures most relevant to your analysis, and export the results for further investigation. You can also compare performance across multiple distributions and benchmark survey results across channels.

Key points to note

  • Single LiveChat Code Per Website: Only one LiveChat code can be embedded per website; manage multiple distributions accordingly.

  • Load Time Theme: The loading screen currently uses the default white-background theme only. Custom theming for the loading screen is planned for a future release.

  • Cart Integration: Cart data is passed via response custom fields and requires implementation by the development team using the metadata enrichment pattern.

Validate Your Website Survey Setup

Use the following steps to validate your website survey configuration:

  • Copy the LiveChat ID from the survey embed code.
  • Open the Website Survey Test Page and replace the YOUR_APP_ID and YOUR_ENV placeholders with the values from your distribution.

  • To test Manual Trigger, call window.sprChat('triggerSurvey', { interceptId: 'YOUR_INTERCEPT_ID' }) from the browser console.
  • Verify Load Time Handling, confirm the loading message appears and rolling messages fire if load time exceeds 2 seconds.
  • Test Profile Authentication.


Best Practices

  • Ensure Proper Placement of LiveChat Code: Double-check that only one LiveChat code is embedded per website to avoid conflicts.

  • Test Across Devices: Make sure to preview the survey on multiple devices (desktop and mobile) to ensure responsiveness and optimize the user experience.

  • Timing and Conditions Sensitivity: Ensure that intercept conditions are defined clearly to avoid surveys being triggered at the wrong time, which could negatively impact the user experience.

  • Test metadata enrichment: Verify that profile and response custom fields appear in responses and reports after enrichment.

FAQs

Yes. Use the SDK Manual Trigger to fire a specific distribution on demand via a JS call. You still need a distribution with a creative and an Intercept ID.

No. Website surveys use the same Live Chat embed code. SDK methods like triggerSurvey and externalCallback are available once the embed snippet is loaded.

Yes. Authentication is optional. Guests can respond normally; profile details apply only when you pass a valid user object and hash.

If load time exceeds 2 seconds, rolling messages are displayed to keep the visitor informed. The target SLA is < 500ms for 99% of cases.

Pass profile custom fields via sprChatSettings.userContext (or through profile authentication). These fields then appear as available conditions in the distribution setup form.