Skip to main content

Events reference

The events the SDK emits while your users use the community, with their fields. To listen to them, see Analytics.

This page uses one canonical name per event and per field, in lowerCamelCase. Each platform follows its own naming convention (for example PostCreated on Android, PostCreatedEvent on Flutter and Unity), and a few fields differ: they are listed in Platform differences.

Content​

postCreated​

Sent when the current user creates a post.

FieldTypeDescription
postIdStringThe id of the post.
contentPostContentWhat the post contains: text, image, poll.
groupIdStringThe id of the group the post was published in.
textLengthIntThe length of the text of the post.

commentCreated​

Sent when the current user creates a comment.

FieldTypeDescription
commentIdStringThe id of the comment.
postIdStringThe id of the post the comment was published on.
textLengthIntThe length of the text of the comment.

replyCreated​

Sent when the current user creates a reply.

FieldTypeDescription
replyIdStringThe id of the reply.
commentIdStringThe id of the comment the reply was published on.
textLengthIntThe length of the text of the reply.

contentDeleted​

Sent when the current user deletes one of their posts, comments or replies.

FieldTypeDescription
contentIdStringThe id of the deleted content.
contentKindContentKindThe kind of the deleted content.

reactionModified​

Sent when the current user adds, changes or removes a reaction on a content.

FieldTypeDescription
contentIdStringThe id of the content.
contentKindContentKindThe kind of the content.
previousReactionReactionKind, optionalThe previous reaction. Empty when the user had no reaction.
newReactionReactionKind, optionalThe new reaction. Empty when the user removed their reaction.

pollVoted​

Sent when the current user votes in a poll.

FieldTypeDescription
contentIdStringThe id of the post that holds the poll.
optionIdStringThe id of the option the user voted for.

contentReported​

Sent when the current user reports a content.

FieldTypeDescription
contentIdStringThe id of the reported content.
reasonslist of ReportReasonThe reasons the user selected.

profileReported​

Android availableiOS not availableFlutter availableReact Native availableUnity ≥ 1.12.2

Sent when the current user reports another member's profile.

FieldTypeDescription
profileIdStringThe id of the reported profile.
reasonslist of ReportReasonThe reasons the user selected.

Gamification​

Only the points earned or lost through an action of the user in the app are reported live. For example, when a moderator removes a post of this user, no event reports the points removed.

gamificationPointsGained​

Sent when the current user gains gamification points.

FieldTypeDescription
pointsIntThe number of points gained.
actionGamificationPointsGainedActionThe action that earned the points.

gamificationPointsRemoved​

Sent when the current user loses gamification points.

FieldTypeDescription
pointsIntThe number of points removed.
actionGamificationPointsRemovedActionThe action that removed the points.

Groups​

groupFollowingChanged​

Sent when the current user follows or unfollows a group.

FieldTypeDescription
groupIdStringThe id of the group.
followedBooltrue when the user followed the group, false when they unfollowed it.

screenDisplayed​

Sent when the user navigates to a screen of the community.

FieldTypeDescription
screenScreenThe screen that was displayed, with its own fields.

Screen is one of:

ScreenFieldsDisplayed when
mainFeedfeedId: StringThe main feed, the list of posts selected for the user.
groups—The list of groups.
groupDetailgroupId: String, source: GroupDetailSourceA group and its posts. source is clientApp when your app opened the group through a bridge, community when the user opened it inside the community.
postDetailpostId: StringA post and its comments.
commentDetailcommentId: StringA comment and its replies.
createPost—The post creation screen.
profile—The profile of the current user.
activity ≥ 1.13.0—The activity of the current user. Emitted instead of profile when the community runs in Unified Profile mode.
otherUserProfileprofileId: StringThe profile of another member.
otherUserPosts ≥ 1.13.0profileId: StringThe posts of another member, as opposed to otherUserProfile (their profile summary). Emitted only in Unified Profile mode: when your app opens a member's posts by their client user id, or when a tap on a member resolves to a member with no client user id. Outside Unified Profile mode, a tap on a member emits otherUserProfile.
editProfile—The profile edition screen.
reportContent—The screen to report a content.
reportProfile—The screen to report a profile.
validateNickname—The nickname validation screen, shown after a user who kept the generated nickname creates a post.
settingsList—The settings screen.
settingsAccount—The account settings screen. Only shown with Octopus authentication, not with SSO.
reportExplanation—The screen that explains reporting.
deleteAccount—The account deletion screen. Only shown with Octopus authentication, not with SSO.
postsFeed (deprecated)feedId: String, relatedTopicId: String, optionalDeprecated: replaced by mainFeed and groupDetail. relatedTopicId is the id of the group of the feed, empty for a feed that spans several groups.

Not every platform emits every screen: see Platform differences.

notificationClicked​

Sent when the user taps a notification of the Octopus notification center.

FieldTypeDescription
notificationIdStringThe id of the notification.
contentIdString, optionalThe id of the content the notification points to. Empty when it points to no content.

postClicked​

Sent when the user taps a post.

FieldTypeDescription
postIdStringThe id of the post.
sourcePostClickedSourceWhere the post was shown: feed (a feed of posts) or profile (the posts of a profile).

translationButtonClicked​

Sent when the user taps the translation button of a content.

FieldTypeDescription
contentIdStringThe id of the content.
contentKindContentKindThe kind of the content.
viewTranslatedBooltrue when the user asked for the translation, false when they went back to the original.

commentButtonClicked​

Sent when the user taps the comment button of a post.

FieldTypeDescription
postIdStringThe id of the post.

replyButtonClicked​

Sent when the user taps the reply button of a comment.

FieldTypeDescription
commentIdStringThe id of the comment.

seeRepliesButtonClicked​

Sent when the user taps the button that shows the replies of a comment.

FieldTypeDescription
commentIdStringThe id of the comment.

Profile​

profileModified​

Sent when the current user modifies their profile: nickname, bio or picture. The shape of the event differs per platform.

  • previousProfile: OctopusProfile? — the profile before the change.
  • newProfile: OctopusProfile — the profile after the change.
is OctopusEvent.ProfileModified -> {
val bioUpdated = event.previousProfile?.bio != event.newProfile.bio
}
info

Android sends the whole profile before and after the change: compare the two to find what changed.


Session​

sessionStarted​

Sent when an Octopus UI session starts.

FieldTypeDescription
sessionIdStringThe id of the session.

sessionStopped​

Sent when an Octopus UI session stops: when the Octopus UI is closed, or when the app goes to the background.

FieldTypeDescription
sessionIdStringThe id of the session.

Types​

ContentKind​

post, comment or reply.

ReactionKind​

heart, joy, mouthOpen, clap, cry or rage, plus unknown for a reaction this version of the SDK does not know.

PostContent​

A set of text, image and poll: what the post contains.

ReportReason​

hateSpeech, explicit, violence, spam, suicide, fakeProfile, childExploitation, intellectualProperty or other.

GamificationPointsGainedAction​

post, comment, reply, reaction, vote, postCommented (another member commented a post of the user), profileCompleted or dailySession.

GamificationPointsRemovedAction​

postDeleted, commentDeleted, replyDeleted or reactionDeleted.


Platform differences​

  • Events are the subtypes of sealed interface OctopusEvent, and enum values are UPPER_CASE (ContentKind.POST, PostClicked.Source.FEED).
  • contentDeleted is one of three types, PostDeleted, CommentDeleted and ReplyDeleted, which all implement ContentDeleted (contentId, contentKind).
  • pollVoted is PollVote.
  • contentReported also carries contentKind.
  • reasons holds Moderation.ReportReason values, with long names such as HateSpeechOrDiscriminatoryContent.
  • ReactionKind is Reaction.Kind: Heart, Joy, MouthOpen, Clap, Cry, Rage and Unknown(unicode).
  • Both gamification events use one Gamification.Action enum; a removal reports the kind of content removed (POST, COMMENT, REPLY, REACTION).
  • groupDetail is GroupDetail, and its source is Source.BRIDGE or Source.COMMUNITY.
  • postsFeed is PostsFeed(feedId, relatedGroupId); relatedTopicId is a deprecated alias.
  • profileModified has its own shape: see profileModified.
info

activity and otherUserPosts are emitted on Android.

Next steps​

  • Analytics — listen to these events and forward them to your analytics tool.
  • A/B testing — measure the impact of the community.