Skip to content

Instantly share code, notes, and snippets.

@RyanHirsch
Created October 20, 2021 21:13
Show Gist options
  • Save RyanHirsch/15f3751ebc82e63d897e16964daf358b to your computer and use it in GitHub Desktop.
Save RyanHirsch/15f3751ebc82e63d897e16964daf358b to your computer and use it in GitHub Desktop.
Custom super property management example
const customSuperProp = {};
function register(obj) {
Object.assign(customSuperProp, obj);
}
function unregister(key) {
delete customSuperProp[key];
}
function track(eventName, eventProperties) {
mixpanel.track(eventName, Object.assign({}, customSuperProp, eventProperties));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment