Card voting
The Atomic SDKs support card voting, which allows you to gauge user sentiment towards the cards you send. When integrating the SDKs, you can choose to enable options for customers to indicate whether a card was useful to the user or not, accessible when they tap on the overflow button in the top right of a card.
If the user indicates that the card was useful, a corresponding analytics event is sent for that card (card-voted-up
).
If they indicate that the card was not useful, they are presented with a secondary screen where they can choose to provide further feedback. The available reasons for why a card wasn’t useful are:
- It’s not relevant;
- I see this too often;
- Something else.
If they select "Something else", a free-form input is presented, where the user can provide additional feedback. The free form input is limited to 280 characters. After tapping "Submit", an analytics event containing this feedback is sent (card-voted-down
).
You can customize the titles that are displayed for these actions, as well as the title displayed on the secondary feedback screen. By default these are:
- Thumbs up - "This is useful";
- Thumbs down - "This isn’t useful";
- Secondary screen title - "Send feedback".
iOS
Card voting is disabled by default. You can enable positive card voting ("This is useful"), negative card voting ("This isn’t useful"), or both:
Swift
let config = AACConfiguration()
config.cardVotingOptions = [.notUseful, .useful] // Enable both voting options
config.cardVotingOptions = [.useful] // Enable one voting option
config.cardVotingOptions = [.none] // Enable no voting options (default)
Objective-C
AACConfiguration *config = [[AACConfiguration alloc] init];
config.cardVotingOptions = AACCardVotingOptionUseful | AACCardVotingOptionNotUseful;
config.cardVotingOptions = AACCardVotingOptionUseful;
config.cardVotingOptions = AACCardVotingOptionNone;
You can also customize the titles for the card voting options, and the title displayed at the top of the feedback screen, presented when a user indicates the card wasn’t useful:
Swift
let config = AACConfiguration()
config.setValue("Provide feedback", for: .votingFeedbackTitle)
config.setValue("Thumbs up", for: .votingUseful)
config.setValue("Thumbs down", for: .votingNotUseful)
Objective-C
AACConfiguration *config = [[AACConfiguration alloc] init];
[config setValue:@"Provide feedback" forCustomString:AACCustomStringVotingFeedbackTitle];
[config setValue:@"Thumbs up" forCustomString:AACCustomStringVotingUseful];
[config setValue:@"Thumbs down" forCustomString:AACCustomStringVotingNotUseful];
Android
Card voting is disabled by default. You can enable positive card voting ("This is useful"), negative card voting ("This isn’t useful"), or both:
Java
streamContainer.setCardVotingOptions(EnumSet.of(VotingOption.Useful, VotingOption.NotUseful)); // Enable both voting options
streamContainer.setCardVotingOptions(EnumSet.of(VotingOption.Useful)); // Enable one voting option
streamContainer.setCardVotingOptions(EnumSet.of(VotingOption.None)); // Disable voting (default)
Kotlin
streamContainer.cardVotingOptions = EnumSet.of(VotingOption.Useful, VotingOption.NotUseful) // Enable both voting options
streamContainer.cardVotingOptions = EnumSet.of(VotingOption.Useful) // Enable one voting option
streamContainer.cardVotingOptions = EnumSet.of(VotingOption.None) // Disable voting (default)
You can also customize the titles for the card voting options, and the title displayed at the top of the feedback screen, presented when a user indicates the card wasn’t useful:
Java
streamContainer.setVotingFeedbackTitle("Provide feedback");
streamContainer.setVotingUsefulTitle("Thumbs up");
streamContainer.setVotingNotUsefulTitle("Thumbs down");
Kotlin
streamContainer.votingFeedbackTitle = "Provide feedback"
streamContainer.votingUsefulTitle = "Thumbs up"
streamContainer.votingNotUsefulTitle = "Thumbs down"
Web
Card voting is disabled by default. You can enable positive card voting ("This is useful"), negative card voting ("This isn’t useful"), or both:
AtomicSDK.launch({
...
features: {
cardVoting: {
canVoteUseful: true, // Whether the user can vote that a card is useful.
canVoteNotUseful: true // Whether the user can vote that a card is not useful.
}
}
})
You can also customize the titles for the card voting options, and the title displayed at the top of the feedback screen, presented when a user indicates the card wasn’t useful:
AtomicSDK.launch({
...
customStrings: {
votingUsefulTitle: 'Positive feedback',
votingNotUsefulTitle: 'Negative feedback',
votingFeedbackTitle: 'Tell us more'
}
})
For more information on using this feature in the SDKs, see the relevant documentation for iOS, Android or Web.