Configuring URL redirects with custom parameters

Setting up a URL redirect with a custom parameter is easy to implement from the perspective of a chat vendor and a Digital customer. While this technique routes the user to a different page, the user stays on the website. It is possible to redirect the user back to the original web page using JavaScript code to detect the previous page.

Using a custom parameter to target a specific survey does not require coding. This technique is reusable for other surveys by modifying the value of the custom parameter and adding a new rule to trigger a different survey.

Using this technique, a user sees a survey when an agent ends a chat session.

The following are technical requirements for this technique:

  • A survey configured to use an invitation trigger.

  • A custom parameter that contains a URL parameter (also known as a URL query string) indicating the survey to display. For example, a URL parameter 'CampaignID' can be defined with a unique ID used to trigger the survey.

  • A rule to evaluate the custom parameter that triggers the invitation. The rule is attached to the selected survey.

  • The survey targeting configuration has a target by rule setting enabled to use the rule in the previous bullet.

  • The chat client can be configured so that the button or control to end the chat can have a standard HTTPS: link that displays the survey.

To configure a URL redirect with a custom parameter, complete the following steps:

  1. Configure the chat client so that the button or control to end the chat executes the HTTP link to a page on the customer website. Add a URL parameter that controls the targeting of the survey. For example:

    https://www.example.com/?CampaignID=PostChat

    Note: The Digital embed.js must be on the target URL that you want to display the survey, whether or not this is the homepage or a dedicated splash page.
  2. Configure a custom parameter as follows:
    • Parameter Name = CampaignID

    • Parameter Type = Text

    • Origin Type = URL

    • Origin Name = CampaignID

    • Attach Forms = either All Forms or select one or more specific forms

  3. Configure a rule called 'Post Chat' where CampaignID = PostChat.
  4. In Form Targeting Configuration, enable Target by Rule and select Post Chat.

  5. Configure the chat client buttons/controls so that the end chat is a link to a URL. For example:

    https://www.example.com?CampaignID=PostChat

    The survey is displayed when the browser opens this specific URL.

Important: This technique assumes that the Digital HTML tag (embed.js) is deployed to the URL selected whether you select the homepage or a dedicated splash page. No coding for the query string is required as your web server will simply ignore it, but the Digital code will be looking for the CampaignID parameter and associated value to trigger the survey.