How to set up Custom Page Names/Paths

SessionCam automatically identifies a page and names it, based on the the full path in the URL on page load. There may be scenarios where you want to change the page name. You can implement custom JavaScript to meet this goal. 

Example Scenarios

  1. The content of a page changes on page load, but the URL remains the same:
    ‘www.domain.com/checkout’ 
    The content of the checkout page changes, there is a page load, but the path is the same. You may want to split up these steps into
    ‘www.domain.com/checkout/delivery’ and ‘www.domain.com/checkout/payment’
  2. The URL is difficult to read or not structured in human language:
    ‘www.domain.com/xdz-#krt/2hyrf6ks.aspx‘
    We could choose to rename this page to
    www.domain.com/product/page.aspx
  3. SessionCam does not capture query string data:
    This means you will see the page ‘www.domain.com/load.aspx?page=PageA’ recorded as ‘www.domain.com/load.aspx.’
    For detailed help on this scenario, please see the following article - How to set up Custom Page Names/Paths based on a query string value
  4. Multiple pages being identified as a single address:
    ‘www.domain.com/load.aspx?page=PageA’
    ‘www.domain.com/load.aspx?page=PageB’
    These could be renamed to
    ‘ www.domain.com/section/pageA’
    www.domain.com/section/pageB
  5. A URL contains unique data or changeable sections:‘www.domain.com/payment/confirmation_123456789’
    ‘www.domain.com/en-GB/product’
    These could be renamed to
    ‘www.domain.com/payment/confirmation’
    www.domain.com/location/product

Code:

Place the following JavaScript on the web page that you which rename, to apply a custom page name in SessionCam. 

 if (!window.sessioncamConfiguration) { window.sessioncamConfiguration = {}; }
 sessioncamConfiguration.SessionCamPath = "/path/";
 sessioncamConfiguration.SessionCamPageName = "page.html";

Follow these steps to test your implementation:

If you need help with steps 1 and 2 there is a more in depth set of instructions here: https://help.sessioncam.com/hc/en-gb/articles/201781517-How-to-go-directly-to-the-Recordings-screen-using-a-Session-ID

  1. Navigate to the page you’re renaming in a browser and type ‘window.sessionCamRecorder.sessionId()’ into the console. Copy the returned value excluding the quote marks.                                                  
  2. Go to the following webpage ‘https://console.sessioncam.com/Console/Recordings/PlaybackSession?sessionId=UniqueID’ replacing ‘UniqueID’ with value you have copied.
  3. Navigate to ‘Current Page’ at the bottom of this screen, and you will see the names of all pages from that Session.