Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

QuanticMind Destination


Server Side

server-side page anchor

Because QuanticMind cannot implicitly alias multiple identifiers for a given user, in order to accommodate both logged out and logged in users across client and server it is required to pass the anonymousId from the client to the server and include it in your server-side calls.

Here's how to grab the anonymousId:

1
analytics.ready(function(){
2
var anonId = analytics.user().anonymousId();
3
});

And here's an example of how to grab the pass it through in a call with Java:

1
analytics.enqueue(TrackMessage.builder("Purchased Item")
2
.userId("<db id here>")
3
.anonymousId("<ajs anon id here>")
4
.properties(ImmutableMap.builder()
5
.put("revenue", 39.95)
6
.put("shipping", "2-day")
7
.build()
8
)
9
);