Automatic integration

Smartlook can be automatically integrated into Mixpanel like this:

val mixpanel = MixpanelAPI.getInstance(this, "YOUR TOKEN")
MixpanelAPI mixpanel = MixpanelAPI.getInstance(this, "YOUR TOKEN");
Smartlook.enableIntegration(new MixpanelIntegration(mixpanel));


The user must be identified in Mixpanel for Smartlook automatic integration to work correctly.

A Smartlook visitor URL will be added as a new property called the Smartlook visitor dashboard URL into a Mixpanel user.


Manual integration

Smartlook can be easily integrated into Mixpanel using IntegrationListener:

Smartlook.registerIntegrationListener(object : IntegrationListener {
    override fun onSessionReady(dashboardSessionUrl: String) {
        val eventProperties = JSONObject()
            .put("Session url", dashboardSessionUrl)

        mixpanel.track("Smartlook session URL", eventProperties)

    override fun onVisitorReady(dashboardVisitorUrl: String) {
        mixpanel.getPeople().set("Smartlook visitor URL", dashboardVisitorUrl)
Smartlook.registerIntegrationListener(new IntegrationListener() {
    public void onSessionReady(@NotNull String dashboardSessionUrl) {
        JSONObject eventProperties = new JSONObject();
        try {
            eventProperties.put("Session url", dashboardSessionUrl);
        } catch (JSONException exception) {
        mixpanel.track("Smartlook session URL", eventProperties);

    public void onVisitorReady(@NotNull String dashboardVisitorUrl) {
        mixpanel.getPeople().set("Smartlook visitor URL", dashboardVisitorUrl);

Full Mixpanel documentation with examples can be found on the official website.