Support custom user and account traits with the Identify feature
You can pass the standard user and account traits, but sometimes you need to pass custom traits.
For example, your users have two different ID's, and you want both passed as traits.
-
Frank Goertzen commented
Horrraaaayyyyy
-
Anonymous commented
Yes I'd love to see custom account traits, eg I'd like to see what version of my android app people are using when they have posted a question.
I've attempted to pass this up in traits but it seems to be ignored:
Config config = getApp().getUserVoiceConfig();
config.identifyUser(userId, name, email);
try {
final int langIdx = prefUtil.getLang();
final String lang = LocaleUtil.getLang(langIdx);config.putAccountTrait("version", getApp().getVersion());
config.putAccountTrait("flavor", BuildConfig.FLAVOR);
config.putAccountTrait("paid", getApp().getIab().hasUnlimitedSafe());
config.putAccountTrait("lang", lang);
config.putAccountTrait("android", String.format("%s (%s %s)", Build.VERSION.RELEASE, Build.VERSION.CODENAME, Build.VERSION.INCREMENTAL));
config.putAccountTrait("device", String.format("%s (%s)", DeviceUtils.getDeviceName(), Build.HARDWARE));
} catch (Exception e) {
App.err(this, "Failed to add metadata to uservoice", e);
}
UserVoice.init(config, this); -
Michael commented
This would be a huge benefit to us. In general, being able to add more custom variables would be awesome.