Heap

Manual integration

Smartlook can be easily integrated into Heap using Event Listeners:

function sessionUrlChangedCallback(sessionUrl: string) {
    heap.track(
        "Smartlook session URL",
        {"session_url": sessionUrl});
}

function userUrlChangedCallback(userUrl: string) {
    heap.addUserProperties({'smartlook_user_url': userUrl});
}

Smartlook.instance.eventListeners.registerUserChangedListener(userUrlChangedCallback);
Smartlook.instance.eventListeners.registerSessionChangedListener(sessionUrlChangedCallback);

Full Heap API documentation can be found on the official website.