Skip to content

Sub-domain cookies

The JavaScript Library can create cookies that will persist between sub-domains via the optional argument domain.

An example use case for this behaviour is if a retailer's shop is located at the sub-domain www and the checkout process is located under the sub-domain order. Normally, the cookie would not exist at the sub-domain order and the session would be broken.


The example below will create an apptus.customerKey cookie and an apptus.sessionKey cookie, each with the domain Note that the prefixed dot (.) in the domain in the cookie is added automatically by the browser.

var api = window.esalesAPI({ 
    market: '{market}', 
    url: 'https://{cluster-id}',
    domain: ''

For more general cookie management information, see Cookies.

Last update: July 7, 2020
Back to top

This online publication is intellectual property of Apptus Technologies. Its contents can be duplicated in part or whole, provided that a copyright label is visibly located on each copy and the copy is used in conjunction with the product described within this document.

All information found in these documents has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither Apptus Technologies nor the authors shall be held liable for possible errors or the consequences thereof.

Software and hardware descriptions cited in these documents might be registered trademarks. All trade names are subject to copyright restrictions and may be registered trademarks. Apptus Technologies essentially adheres to the manufacturer’s spelling. Names of products and trademarks appearing in this document, with or without specific notation, are likewise subject to trademark and trade protection laws and may thus fall under copyright restrictions.