Live Agent post chat page

Live agent post chat page allows you to share the details with customers at the end of a chat session. For example, you can direct your customers to another
Web page after they complete a chat with an agent, or forward them to a survey about their chat experience. You can create a Visualforce page to host your post-chat page, or you can develop a page on your own and add the URL to your chat
button configuration.

<apex:page showHeader='false'>
    <div id='details'>
        <!-- This will present all the post chat parameters available to this page -->
        <h1>Post Chat Page</h1>
        <p>
            <!-- These variables are passed to the post-chat page and can be used to
customize your post-chat experience -->
            Request Time: <apex:outputText id='c_rt'
                                           value='{!$CurrentPage.parameters.requestTime}' /><br/>
            Start Time: <apex:outputText id='c_st'
                                         value='{!$CurrentPage.parameters.startTime}' /><br/>
            Deployment Id: <apex:outputText
                                            value='{!$CurrentPage.parameters.deploymentId}' /><br/>
            Button Id: <apex:outputText value='{!$CurrentPage.parameters.buttonId}'
                                        /><br/>
            Chat Key: <apex:outputText value='{!$CurrentPage.parameters.chatKey}'
                                       /><br />
            Last Visited Page: <apex:outputText
                                                value='{!$CurrentPage.parameters.lastVisitedPage}' /><br/>
            Original Referrer: <apex:outputText
                                                value='{!$CurrentPage.parameters.originalReferrer}' /><br/>
            <!-- When the GeoLocation is not available this will appear as Unknown
-->
            Latitude: <apex:outputText value='{!$CurrentPage.parameters.latitude}'
                                       /><br/>
            Longitude: <apex:outputText value='{!$CurrentPage.parameters.longitude}'
                                        /><br/>
            City: <apex:outputText value='{!$CurrentPage.parameters.city}' /><br/>
            Region: <apex:outputText value='{!$CurrentPage.parameters.region}' /><br/>
            Country: <apex:outputText value='{!$CurrentPage.parameters.country}'
                                      /><br/>
            <!-- End of GeoLocation information -->
            Organization: <apex:outputText
                                           value='{!$CurrentPage.parameters.organization}' /><br/>
            Disconnected By: <apex:outputText
                                              value='{!$CurrentPage.parameters.disconnectedBy}' /><br/>
            Window Language: <apex:outputText
                                              value='{!$CurrentPage.parameters.windowLanguage}' /><br/>
            Chat Details: <apex:outputText
                                           value='{!$CurrentPage.parameters.chatDetails}' /><br />
            Transcript: <apex:outputText value='{!$CurrentPage.parameters.transcript}'
                                         /><br/>
            Attached Records : <apex:outputText
                                                value='{!$CurrentPage.parameters.attachedRecords}' /><br />
            Error: <apex:outputText value='{!$CurrentPage.parameters.error}' /><br
                                                                                   />
        </p>
    </div>
    <hr/>
    <!-- Message to show if chat is abandoned -->
    <div id='abandoned' style='display: none;'>
        We are sorry you decided to leave the chat. Feel free to initiate a new session.
    </div>
    <!-- Code to decide if we show the abandoned block or the full data -->
    <script type='text/javascript'>
    var requestTime = '{!$CurrentPage.parameters.requestTime}';
    var startTime = '{!$CurrentPage.parameters.startTime}';
    // when startTime doesn't have a value, it means the chat never started
    if (!startTime) {
        document.getElementById('details').style.display = 'none';
        document.getElementById('abandoned').style.display = 'block';
    }
    </script>
</apex:page>

Now go and update the chat button and automated invitations”post chat page ” as shown below with the visual force page your created.

Once chat is ended which will display the result as shown below.insted of showing the simple chat details even you can build your own logic like sending automatic post chat surveys or feedback etc by using post chat pages.