Created
October 20, 2021 21:13
-
-
Save RyanHirsch/15f3751ebc82e63d897e16964daf358b to your computer and use it in GitHub Desktop.
Custom super property management example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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