Methods

setDomain

/**
 * @param domain Specifies the domain within which this cookie should be presented.
 */
setDomain(domain: string) => void;
JS

getDomain

/**
 * @return Gets the domain name of this cookie.
 */
getDomain() => string;
JS

setMaxAge

/**
 * Sets the maximum age in seconds for this cookie.
 *
 * @param expiry Sets the maximum age in seconds for this cookie.
 */
setMaxAge(int expiry: number) => void;
JS

getMaxAge

/**
 * Gets the maximum age in seconds of this cookie.
 *
 * @return Gets the maximum age in seconds of this cookie.
 */
getMaxAge() => number;
JS

setPath

/**
 * @param uri Specifies a path for the cookie to which the client should return the cookie.
 */
setPath(uri: string) => void;
JS

getPath

/**
 * @return Returns the path on the server to which the browser returns this cookie.
 */
getPath() => string;
JS

setSecure

/**
 * @param flag Indicates to the browser whether the cookie should only be sent using a secure protocol, such as
 *             HTTPS or SSL.
 */
setSecure(boolean flag: boolean) => void;
JS

isSecure

/**
 * @return  Returns true if the browser is sending cookies only over a secure protocol, or false if the browser
 *          can send cookies using any protocol.
 */
isSecure() => boolean;
JS

getName

/**
 * @return Returns the name of the cookie.
 */
getName() => string;
JS

getValue

/**
 * @return Gets the current value of this cookie.
 */
getValue() => string;
JS

setHttpOnly

/**
 * @param isHttpOnly Marks or unmarks this cookie as HttpOnly.
 */
setHttpOnly(isHttpOnly: boolean) => void;
JS

isHttpOnly

/**
 * @return Checks whether this cookie has been marked as HttpOnly.
 */
isHttpOnly() => boolean;
JS

Create your own LoggerClass to debug our Mapp Intelligence js library.

Methods

log

/**
 * @param msg Debug message
 */
log(...msg: Array<any>) => void;
JS

Example

class CustomLogger implements IMappIntelligenceLogger {
	public log(...msg: Array<any>): void {
		console.log(...msg);
	}
}
JS

Create your own ConsumerClass to use for data transfer to Intelligence.

Methods

sendBatch

/**
 * @param batchContent List of tracking requests
 *
 * @return Promise<boolean>
 */
sendBatch(batchContent: Array<string>): Promise<boolean>;
JS

Example

class TestCustomPrintConsumer implements IMappIntelligenceConsumer {
	public sendBatch(batchContent: Array<string>): Promise<boolean> {
		return new Promise(async function(resolve) {
            for (let request of batchContent) {
                console.log(request);
            }

            resolve(true);
        });
	}
}
JS