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:
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.- 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
- Configure a rule called 'Post Chat' where CampaignID = PostChat.
In Form Targeting Configuration, enable Target by Rule and select Post Chat.
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.