Skip to content

Instantly share code, notes, and snippets.

View asherccohen's full-sized avatar

Asher Cohen asherccohen

View GitHub Profile
(function (history, trackingId, options) {
const generateId = () => {
return '_' + Math.random().toString(36).substr(2, 9);
};
const getId = () => {
if (!localStorage.cid) {
localStorage.cid = generateId()
}
return localStorage.cid;
};