identity

The current user’s identity, if identified. Use identity to link activity between Heap’s client-side and server-side track APIs.

If you’re unsure which version of Heap you’re using, see Identifying your Heap version.

Current version (heap.js 5)

heap.getIdentity()
heap.shared.identity

Classic heap.js

var userId = heap.userId;
var identity = heap.identity;
const userId = heap.userId;
const identity = heap.identity;
NSString *userId = [Heap userId];
NSString *identity = [Heap identity];
let userId = Heap.userId
let identity = Heap.identity
String userId = Heap.getUserId();
String identity = Heap.getIdentity();
val userId = Heap.getUserId()
val identity = Heap.getIdentity()
Did you find what you were looking for?
Thumb up Thumb down