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 behavior 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.

Example

The example below will create an apptus.customerKey cookie and an apptus.sessionKey cookie, each with the domain .example.com. 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}.api.esales.apptus.cloud',
    domain: 'example.com'
 });

For more general cookie management information, see Cookies.

×
Copyright

This online publication is intellectual property of Voyado Lund AB. 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 Voyado Lund AB 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. Voyado Lund AB 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.

CLOSE