Created
August 24, 2020 04:58
-
-
Save bachhm-dev/d5a6c21e597b4cbdd9f16a75cbeb6139 to your computer and use it in GitHub Desktop.
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
import * as firebase from "nativescript-plugin-firebase"; | |
setUserProperty({ key, value }) { | |
firebase.analytics | |
.setUserProperty({ | |
key: key, | |
value: value, | |
}) | |
.then( | |
() => { | |
console.log("Analytics user property set"); | |
}, | |
(error) => { | |
console.log(`Analytics user property set error ${error}`); | |
} | |
); | |
}, | |
setUserId(userId){ | |
firebase.analytics.setUserId({ | |
userId: "userId" | |
}).then( | |
function () { | |
console.log("Analytics userId set"); | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment